untb (version 1.0-9)

species.count: Ecosystem diagnostics

Description

Provides ecosystem diagnostics of species count datasets (species counts and species tables), mainly for the output of untb()

Usage

species.count(x)
species.table(x)
species.abundance(x)
normalize(x,keepnames=FALSE)
species.curve(x, show.uncertainty = FALSE, n=10, ...)
phi(x)

Arguments

x
In functions species.count() and species.table(), an integer matrix whose rows are integers representing the individuals' species. In function species.abundance() and species.curve(),
keepnames
In function normalize, Boolean with default FALSE meaning to delete the names and TRUE meaning to retain them. Retaining names can be confusing.
show.uncertainty
In function species.curve(), Boolean with TRUE meaning to show bootstrapped estimates for the species diversity curve, and default FALSE meaning to omit this.
n
In function species.curve(), the number of bootstrapped estimates to plot
...
In function species.curve(), extra parameters passed to plot().

Value

  • Returns a vector

Details

Function species.count() returns the total number of species present as a function of time

Function species.table() returns a matrix $M$ where M[i,j] column of the matrix is the abundance of species $j$ at time i.

Function species.abundance() takes an integer vector and returns a table of abundances of species, ordered by abundance. (Actually it's not a table but a two-row matrix because a matrix can have labelled rows and a table can't). Function normalize() takes an ecosystem vector and renames the species so that the most abundant one is 1, the second most abundant is 2, and so on.

Function phi() takes an ecosystem vector and returns a vector whose $i$th element is the number of species with $i$ individuals; this is used by function theta.prob().

The functions work well with the output of function untb().

Function species.curve() plots a dominance diversity curve.

See Also

preston

Examples

Run this code
a <- untb(n=50, prob=0.01, gens=2000, keepall=TRUE, start.mono=TRUE)

plot(species.count(a),type="b")
matplot(species.table(a),type="l",lty=1)

jj <- a[2000,]
print(jj)
species.abundance(jj)

gg <- c(rep("a",10),rep("b",3),letters[5:9])
normalize(gg)
phi(gg)

## Thus there are 5 species with one individual (ie singletons) , zero
## species with two individuals, one species with three individuals, and
## so on.


data(butterflies)
phi(butterflies)

Run the code above in your browser using DataLab