powered by
Create vector of species frequencies from vector of sample frequencies.
sample.to.species.freq(x, min.f = NULL)
a vector(f) of species frequencies where f[i] is the number of species represented by only i samples.
f
f[i]
i
a vector where x[i] is of the number of samples in the i-th species.
x[i]
minimum size of return vector. Return vector is zero-padded up to this length if it would normally be shorter.
Eric Archer eric.archer@noaa.gov
species.to.sample.freq
x <- sample(1:20, 20, rep = TRUE) f <- sample.to.species.freq(x) print(x) print(f)
Run the code above in your browser using DataLab