View source: R/prepare_breakaway.R
prepare_breakaway | R Documentation |
This function prepares input data for breakaway
package (Willis, Bunge, 2015).
prepare_breakaway(OTUs, remove_singletons = FALSE)
OTUs |
Data frame with OTU abundances (rows = species, cols = samples) or phyloseq/otu_table object |
remove_singletons |
Logical; if TRUE, singleton counts will be removed |
In case of sequencing errors singletons can be excluded from the data ('remove_singletons = TRUE')
and species richness estimation can be performed with breakaway_nof1
function.
List of the sample frequency count tables for each sample.
Willis A., Bunge J. (2015) Estimating diversity via frequency ratios // Biometrics 71(4), P. 1042–1049. DOI: 10.1111/biom.12332
data("esophagus")
eso <- prepare_breakaway(esophagus)
eso_nof1 <- prepare_breakaway(esophagus, remove_singletons = TRUE)
# Estimate species richness (observed + unobserved) for the second sample in esophagus data
library(breakaway)
breakaway(eso[[2]], plot = T)
breakaway_nof1(eso_nof1[[2]], plot = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.