richness: Species Richness

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Retrieve dataset, sample or pooled species richness by partition.

Usage

1
2
3
4
5
6
## 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"))

Arguments

obj

Vegsoup* or Speciesobject.

choice

Return either dataset or sample richness, defaults to dataset. Partial matches are allowed. Objects of class 'VegsoupPartition' take an additional option "partition".

Details

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.

Value

A numeric vector of suitable size with names taken from the object, except choice = "dataset", where names are meaningless

Author(s)

Roland Kaiser

See Also

rowSums,colSums

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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")

vegsoup documentation built on Feb. 24, 2021, 3 a.m.