iNEXTBetaDiv: iNterpolation and EXTrapolation for Beta diversity

View source: R/MainFun.r

iNEXTBetaDivR Documentation

iNterpolation and EXTrapolation for Beta diversity

Description

iNEXTBetaDiv: Interpolation and extrapolation of Beta diversity with order q

Usage

iNEXTBetaDiv(
  data,
  q = c(0, 1, 2),
  datatype = "abundance",
  base = "coverage",
  level = NULL,
  nboot = 20,
  conf = 0.95
)

Arguments

data

(a) For datatype = "abundance", data can be input as a matrix/data.frame (species by assemblages), or a list of matrices/data.frames, each matrix represents species-by-assemblages abundance matrix.
(b) For datatype = "incidence_raw", data can be input as a list of matrices/data.frames, each matrix represents species-by-sampling units.

q

a numerical vector specifying the diversity orders. Default is c(0, 1, 2).

datatype

data type of input data: individual-based abundance data (datatype = "abundance") or species by sampling-units incidence matrix (datatype = "incidence_raw") with all entries being 0 (non-detection) or 1 (detection).

base

Sample-sized-based rarefaction and extrapolation for gamma and alpha diversity (base = "size") or coverage-based rarefaction and extrapolation for gamma, alpha and beta diversity (base = "coverage"). Default is base = "coverage".

level

A numerical vector specifying the particular value of sample coverage (between 0 and 1 when base = "coverage") or sample size (base = "size"). level = 1 (base = "coverage") means complete coverage (the corresponding diversity represents asymptotic diversity).
If base = "size" and level = NULL, then this function computes the gamma and alpha diversity estimates up to double the reference sample size. If base = "coverage" and level = NULL, then this function computes the gamma and alpha diversity estimates up to one (for q = 1, 2) or up to the coverage of double the reference sample size (for q = 0);
the corresponding beta diversity is computed up to the same maximum coverage as the alpha diversity.

nboot

a positive integer specifying the number of bootstrap replications when assessing sampling uncertainty and constructing confidence intervals. Bootstrap replications are generally time consuming. Enter 0 to skip the bootstrap procedures. Default is 20. If more accurate results are required, set nboot = 100 (or 200).

conf

a positive number < 1 specifying the level of confidence interval. Default is 0.95.

Value

A list of seven data frames, three for diversity and four for dissimilarity. Also, if more than one dataset is included, the list will contain one component for each dataset, and each component will be the list of seven data frames.

Examples

## abundance data & coverage-based
data(beetle_abu)
output1 = iNEXTBetaDiv(data = beetle_abu, datatype = 'abundance',
                       nboot = 20, conf = 0.95)
output1


## incidence data & coverage-based
data(beetle_inc)
output2 = iNEXTBetaDiv(data = beetle_inc, datatype = 'incidence_raw',
                       nboot = 20, conf = 0.95)
output2


## abundance data & size-based
data(beetle_abu)
output3 = iNEXTBetaDiv(data = beetle_abu, datatype = 'abundance', base = 'size',
                       nboot = 20, conf = 0.95)
output3


## incidence data & size-based
data(beetle_inc)
output4 = iNEXTBetaDiv(data = beetle_inc, datatype = 'incidence_raw', base = 'size',
                       nboot = 20, conf = 0.95)
output4



KaiHsiangHu/iNEXT.BetaDiv documentation built on Sept. 17, 2022, 4:15 p.m.