sample.to.species.freq {sprex}R Documentation

Create Vector of Species Frequencies

Description

Create vector of species frequencies from vector of sample frequencies.

Usage

sample.to.species.freq(x, min.f = NULL)

Arguments

x

a vector where x[i] is of the number of samples in the i-th species.

min.f

minimum size of return vector. Return vector is zero-padded up to this length if it would normally be shorter.

Value

a vector(f) of species frequencies where f[i] is the number of species represented by only i samples.

Author(s)

Eric Archer eric.archer@noaa.gov

See Also

species.to.sample.freq

Examples

x <- sample(1:20, 20, rep = TRUE)
f <- sample.to.species.freq(x)
print(x)
print(f)


[Package sprex version 1.4.1 Index]