rarefaction | R Documentation |
Performs rarefaction on count table.
rarefaction(x, sample) ## Default S3 method: rarefaction(x, sample) ## S3 method for class 'Dataset' rarefaction(x, sample)
x |
Either a matrix object or a Dataset object. If a matrix is passed, samples must be the columns and rows the species. |
sample |
Sample size, either a single integer value or a vector of the same length the number of columns (samples) of x. |
Modified from the rrarefy function of vegan-2.0-4.
The defualt method returns a matrix with the rarefied counts. The Dataset method returns a Dataset object where the Tab element is the rarefied counts.
Sur Herrera Paredes
data(Rhizo) data(Rhizo.map) Dat <- create_dataset(Rhizo,Rhizo.map) set.seed(712) # Always specify and save the seed before rarefaction rarefaction(x=Dat$Tab,sample=100) set.seed(712) rarefaction(x=Dat,sample=100)$Tab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.