Calculate NST for each group
nst(otutab, group_df, threads = 1, file = NULL, rep = 20, save = FALSE)
a b_dist object, dis is MSTij
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.
# \donttest{
if (requireNamespace("NST")) {
library(ggplot2)
data(otutab, package = "pcutils")
nst(otutab, metadata["Group"]) -> nst_res
plot(nst_res, c_group = "intra") + geom_hline(yintercept = 0.5, lty = 2) + ylab("NST")
}
#> Loading required namespace: NST
# }