as.b_dist {pctax} | R Documentation |
Transfer dist to b_dist
Description
Transfer dist to b_dist
Plot dist
Plot b_dist
Usage
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", ...)
Arguments
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 |
Value
a b_dist with annotation by group
a pheatmap
a ggplot or pheatmap
Examples
data(otutab, package = "pcutils")
mat_dist(otutab) %>% as.b_dist(., group_df = metadata["Group"]) -> aa
plot(aa)
plot(aa, mode = 2)
[Package pctax version 0.1.1 Index]