Learn R Programming

sprex (version 1.4.1)

expand.freqs: Expand Frequency Matrix

Description

Expand a matrix or data.frame of species frequencies to full vector.

Usage

expand.freqs(freq.mat)

Arguments

freq.mat
a two column matrix or data.frame where the first column is the number of samples, and the second column is the number of species represented by with that many samples.

Value

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

Examples

Run this code
data(osa.old.growth)
f <- expand.freqs(osa.old.growth)
f

Run the code above in your browser using DataLab