Cohesion calculation
Plot cohesion
Cohesion(otutab, reps = 200, threads = 1, mycor = NULL, verbose = TRUE)
# S3 method for class 'cohesion'
plot(x, group, metadata, mode = 1, ...)
otutab
iteration time
threads
a correlation matrix you want to use, skip the null model build when mycor is not NULL, default: NULL
verbose
Cohesion()
result (cohesion object)
group name in colnames(metadata)
metadata
plot mode, 1~2
additional arguments for group_box
(mode=1) or group_box
(mode=2)
Cohesion object: a list with two dataframe
a ggplot
Herren, C. M. & McMahon, K. (2017) Cohesion: a method for quantifying the connectivity of microbial communities. doi:10.1038/ismej.2017.91.
# \donttest{
data("otutab", package = "pcutils")
# set reps at least 99 when you run.
Cohesion(otutab[1:50, ], reps = 19) -> cohesion_res
if (requireNamespace("ggpubr")) {
plot(cohesion_res, group = "Group", metadata = metadata, mode = 1)
plot(cohesion_res, group = "Group", metadata = metadata, mode = 2)
}
#> Loading required namespace: ggpubr
# }