nti_rc: Calculate b_NTI and RC_bray for each group

View source: R/eco_micro.R

nti_rcR Documentation

Calculate b_NTI and RC_bray for each group

Description

Calculate b_NTI and RC_bray for each group

Plot NTI_RC object

Usage

nti_rc(
  otutab,
  phylo,
  group_df,
  threads = 1,
  file = NULL,
  rep = 20,
  save = FALSE
)

## S3 method for class 'NTI_RC'
plot(x, ...)

Arguments

otutab

an otutab data.frame, samples are columns, taxs are rows.

phylo

a phylo object

group_df

a dataframe with rowname and one group column

threads

default:4

file

filename to save

rep

repeat numbers: suggest 999

save

save the file

x

NTI_RC object

...

pass to stackplot

Value

a b_dist object, dis is MSTij

ggplot

References

Ning, D., Deng, Y., Tiedje, J. M. & Zhou, J. (2019) A general framework for quantitatively assessing ecological stochasticity. Proceedings of the National Academy of Sciences 116, 16892–16898.

Examples


if (requireNamespace("NST") && requireNamespace("pctax")) {
  data(otutab, package = "pcutils")
  pctax::df2tree(taxonomy) -> phylo
  nti_rc(otutab, phylo, metadata["Group"]) -> nti_res
  plot(nti_res)
}


pctax documentation built on May 29, 2024, 10:03 a.m.