Calculate b_NTI and RC_bray for each group

Plot NTI_RC object

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

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