sample.to.species.freq: Create Vector of Species Frequencies

View source: R/sample.to.species.freq.R

sample.to.species.freqR 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)


EricArcher/sprex documentation built on Sept. 4, 2023, 8:35 a.m.