Cohesion | R Documentation |
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 |
otutab |
reps |
iteration time |
threads |
threads |
mycor |
a correlation matrix you want to use, skip the null model build when mycor is not NULL, default: NULL |
verbose |
verbose |
x |
|
group |
group name in colnames(metadata) |
metadata |
metadata |
mode |
plot mode, 1~2 |
... |
additional arguments for |
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.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.