JostDiversity: Jost diversity from 'vegetarian' Package

Description Usage Arguments Details Value Examples

Description

Data input t.community.matrix is a transposed matrix of community matrix we defined in ComMA. Community matrix from file is a matrix where rows are OTUs or individual species and columns are sites or samples. See ComMA.

Usage

1
2
3
4
diversityTable(t.community.matrix, named.vector = FALSE)

summaryCMPerSample(t.community.matrix, hasTotal = TRUE, digits = 2,
  sort = "descending", comma.in.number = TRUE)

Arguments

t.community.matrix

is abundances argument in vegetarian d, which is a transposed matrix of community matrix, where rows are plots (Use plots instead of subplots.), columns are OTUs.

named.vector

Logical, if TRUE, then return a named vector instead of data.frame.

hasTotal

If TRUE, then display the Total. Default to TRUE.

sort

Sort abundance column by "descending", "ascending", or do nothing for any other string.

comma.in.number

If TRUE, then add comma to bug numbers. Default to TRUE.

digit

The digits of Shannon index. Default to 2.

Details

diversityTable creates a data frame or named vector of Jost diversity measurement.

summaryCMPerSample creates a brief summary table of diversities per sample.

Value

diversityTable returns a 3x3 data frame: columns are levels of diversity c("gamma", "alpha", "beta"), rows are orders of the diversity measure c(0, 1, 2). For example,

$q=0$ $q=1$ $q=1$
$D_\gamma(q)$ 13922.000000 2501.693162 601.509610
$D_\alpha(q)$ 2238.392857 880.944977 251.127187
$D_\beta(q)$ 6.219641 2.839784 2.395239

summaryCMPerSample returns a summary data frame: columns are types of diversity c("abundance", "richness", "shannon"), rows are samples. For example,

$q=0$ $q=1$ $q=1$
Total 688,733 16,860 NA
sample1 32,837 508 23.02
sample2 25,023 181 7.9

Examples

1
2
3
diversity.table <- diversityTable(t.community.matrix)

summary.t.cm <- summaryCMPerSample(t.community.matrix)

walterxie/ComMA documentation built on May 3, 2019, 11:51 p.m.