untb (version 1.0-20)

phi: Ecosystem diagnostics

Description

Ecosystem diagnostics such as Hubbell's phi and species count

Usage

phi(x,addnames=TRUE)
no.of.spp(x)
no.of.ind(x)
no.of.singletons(x)
singletons(x)
simpson(x)

Arguments

x
Ecosystem vector; is coerced to class count
addnames
In function phi(), Boolean with default TRUE meaning to set the name of the $i$th element to the species with abundance $i$ if unique. Set to FALSE to suppress this, which is useful if the species names

Details

Function phi() coerces its argument to a count object and by default returns a named vector whose $i$th element is the number of species with $i$ individuals. The name of the $i$th element is the species with abundance $i$ if unique and empty otherwise. Function phi() is used by theta.prob().

Function no.of.spp() returns the number of species in an ecosystem object.

Function no.of.ind() returns the number of individuals.

Function no.of.singletons() returns the number of singletons.

Function singletons() returns the names of the singletons.

Function simpson() returns the Simpson index $D$: the probability that two randomly sampled individuals belonging to different species

References

Hubbell

See Also

preston

Examples

Run this code
data(butterflies)
phi(butterflies,add=FALSE)

no.of.spp(butterflies)
no.of.ind(butterflies)

D <- simpson(butterflies)
theta <- optimal.prob(butterflies)*2*no.of.ind(butterflies)

#compare theta with D/(1-D) (should be equal):

theta
D/(1-D)

Run the code above in your browser using DataCamp Workspace