rarefy | R Documentation |
Sub-sample OTU observations such that all samples have an equal number.
If called on data with non-integer abundances, values will be re-scaled to
integers between 1 and depth
such that they sum to depth
.
rarefy(biom, depth = 0.1, n = NULL, seed = 0, clone = TRUE, cpus = NULL)
biom |
An rbiom object, such as from |
depth |
How many observations to keep per sample. When
|
n |
The number of samples to keep. When |
seed |
An integer seed for randomizing which observations to keep or drop. If you need to create different random rarefactions of the same data, set the seed to a different number each time. |
clone |
Create a copy of |
cpus |
The number of CPUs to use. Set to |
An rbiom object.
Other rarefaction:
rare_corrplot()
,
rare_multiplot()
,
rare_stacked()
,
rarefy_cols()
,
sample_sums()
Other transformations:
modify_metadata
,
rarefy_cols()
,
slice_metadata
,
subset()
,
with()
library(rbiom)
sample_sums(hmp50) %>% head()
biom <- rarefy(hmp50)
sample_sums(biom) %>% head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.