richness {vegsoup} | R Documentation |
Retrieve dataset, sample or pooled species richness by partition.
## S4 method for signature 'Species' richness(obj, choice = c("dataset", "sample")) ## S4 method for signature 'Vegsoup' richness(obj, choice = c("dataset", "sample")) ## S4 method for signature 'VegsoupPartition' richness(obj, choice = c("dataset", "sample", "partition"))
obj |
|
choice |
Return either dataset or sample richness, defaults to |
Dataset richness is defined as the number of species (discarding layer replicates) found in the object. Sample richness is the number of species per sample (plot, relevé) and partition richness is the pooled species richness per partition. In order to calculate correct species richness, in cases when the object has more than one layer, all occurrences of a particular species in different layers are collapsed.
A numeric vector of suitable size with names taken from the object, except choice = "dataset"
, where names are meaningless
Roland Kaiser
require(vegsoup) data(barmstein) x <- barmstein richness(x) # default choice = "dataset" richness(x, "sa") # partial match # method for class Species richness(species(x)) # rowSums counts each species-layer replication (pseudo-species). # Because there are 3 layers the numbers are different # compared to richness(dta, "sample")! rowSums(x) # extact number of unique species per partition richness(VegsoupPartition(x, k = 2), "partition")