bdiv_clusters | R Documentation |
Cluster samples by beta diversity k-means.
bdiv_clusters(
biom,
bdiv = "Bray-Curtis",
weighted = TRUE,
normalized = TRUE,
tree = NULL,
k = 5,
...
)
biom |
An rbiom object, such as from |
bdiv |
Beta diversity distance algorithm(s) to use. Options are:
|
weighted |
Take relative abundances into account. When
|
normalized |
Only changes the "Weighted UniFrac" calculation.
Divides result by the total branch weights. Default: |
tree |
A |
k |
Number of clusters. Default: |
... |
Passed on to |
A numeric factor assigning samples to clusters.
Other beta_diversity:
bdiv_boxplot()
,
bdiv_corrplot()
,
bdiv_heatmap()
,
bdiv_ord_plot()
,
bdiv_ord_table()
,
bdiv_stats()
,
bdiv_table()
,
distmat_stats()
Other clustering:
taxa_clusters()
library(rbiom)
biom <- rarefy(hmp50)
biom$metadata$bray_cluster <- bdiv_clusters(biom)
pull(biom, 'bray_cluster')[1:10]
bdiv_ord_plot(biom, stat.by = "bray_cluster")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.