get_NRI_NTI {MicrobiotaProcess} | R Documentation

## NRI (Nearest Relative Index) and NTI (Nearest Taxon Index)

### Description

calculate NRT and NTI of sample. It is a wrapper method of picante::ses.mpd and picante::ses.mntd

### Usage

    get_NRI_NTI(obj, ...)

    ## S4 method for signature 'matrix'
    get_NRI_NTI(
      obj,
      mindepth,
      sampleda,
      tree,
      abundance.weighted = TRUE,
      force = FALSE,
      seed = 123,
      ...
    )

    ## S4 method for signature 'data.frame'
    get_NRI_NTI(obj, mindepth, sampleda, tree, abundance.weighted = TRUE, ...)

    ## S4 method for signature 'phyloseq'
    get_NRI_NTI(obj, mindepth, abundance.weighted = TRUE, ...)

### Arguments

`obj` | object, data.frame of (nrow sample * ncol taxonomy(feature)) or phyloseq.
`...` | additional arguments see also "ses.mpd" and "ses.mntd" of "picante".
`mindepth` | numeric, Subsample size for rarefying community.
`sampleda` | data.frame, sample information, row sample * column factors.
`tree` | tree object, it can be phylo object or treedata object.
`abundance.weighted` | logical, whether calculate mean nearest taxon distances for each species weighted by species abundance, default is TRUE.
`force` | logical whether calculate the index even the count of otu is not rarefied, default is FALSE. If it is TRUE, meaning the rarefaction is not be performed automatically.
`seed` | integer a random seed to make the result reproducible, default is 123.

### Value

alphasample object contained NRT and NTI.

### Author(s)

Shuangbin Xu

[Package MicrobiotaProcess version 1.4.4 Index]