as.b_dist | R Documentation |
Transfer dist to b_dist
Plot dist
Plot b_dist
as.b_dist(dist, group_df = NULL)
## S3 method for class 'dist'
plot(x, group_df = NULL, ...)
## S3 method for class 'b_dist'
plot(x, mode = 1, c_group = "inter", ...)
dist |
a dist object |
group_df |
a dataframe with rowname same to dist and one group column |
x |
a b_dist |
... |
additional |
mode |
1~3 |
c_group |
"inter" or "intra" or both to plot |
a b_dist with annotation by group
a pheatmap
a ggplot or pheatmap
data(otutab, package = "pcutils")
mat_dist(otutab) %>% as.b_dist(., group_df = metadata["Group"]) -> aa
plot(aa)
plot(aa, mode = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.