divLevel: compute diversity indices

Description Usage Arguments Value Examples

Description

function computes diversity indices for level VJ, V or J

Usage

1
2
3
4
5
6
7
divLevel(
  x,
  index = c("shannon", "simpson", "invsimpson"),
  level = c("VJ", "V", "J"),
  norm = TRUE,
  base = exp(1)
)

Arguments

x

a object of class RepSeqExperiment.

index

diversity index, the choice are "shannon", "simpson", "invsimpson".

level

diversity index should be computed for the level "V", "J", or "VJ".

norm

normalized diversity index will be returned (divided by log(S) with S number of observed species).

base

log base . Default value: exp(1)

Value

a data.table of diversity indices computed at the level "level".

Examples

1
2
3
4
5
6
7
## Not run: 
# The package RepSeqData contains example datasets 
library(RepSeqData)
divindices <- divLevel(x = RepSeqData, index = "shannon", level = "VJ")
divindices

## End(Not run)

ph-pham/RepSeq documentation built on Dec. 22, 2021, 7:47 a.m.