fit_sncm: Fits 'sncm' to an OTU table

Description Usage Arguments Value See Also Examples

View source: R/modeling_tools.R

Description

Fits the neutral model from Sloan et al. (2006) to an OTU table and returns several fitting statistics as well as predicted occurrence frequencies for each OTU based on their abundance in the metacommunity. The author of this function is Adam Burns (aburns2@uoregon.edu), and was originally published in Burns et al. (2016).

Usage

1
fit_sncm(spp, pool = NULL, taxon = NULL)

Arguments

spp

A community table for communities of interest with local communities/samples as rows and taxa as columns. All samples must be rarefied to the same depth.

pool

(optional) A community table for defining source community.

taxon

(optional) A table listing the taxonomic calls for each otu, with OTU ids as row names and taxonomic classifications as columns.

Value

This function returns list of two elements. The first element, spp.out$fitstats, contains various fitting stats. The second element contains the predicted occurrence frequencies for each OTU/ASV, as well as their fit_class

See Also

plot_sncm_fit

Examples

1
2
3
4
spp <- otu_table(ps)@.Data
spp2 <- otu_table(ps2)@.Data
spp.out <- fit_sncm(spp, pool=NULL, taxon=NULL)
spp.out <- fit_sncm(spp, pool=spp2, taxon=data.frame(tax_table(ps)))

DanielSprockett/reltools documentation built on May 5, 2019, 12:27 p.m.