bdiv_ord_plot | R Documentation |
Ordinate samples and taxa on a 2D plane based on beta diversity distances.
bdiv_ord_plot(
biom,
bdiv = "Bray-Curtis",
ord = "PCoA",
weighted = TRUE,
layers = "petm",
stat.by = NULL,
facet.by = NULL,
colors = TRUE,
shapes = TRUE,
tree = NULL,
test = "adonis2",
seed = 0,
permutations = 999,
rank = -1,
taxa = 4,
p.top = Inf,
p.adj = "fdr",
unc = "singly",
caption = TRUE,
underscores = FALSE,
...
)
biom |
An rbiom object, such as from |
bdiv |
Beta diversity distance algorithm(s) to use. Options are:
|
ord |
Method for reducing dimensionality. Options are:
Multiple/abbreviated values allowed. Default: |
weighted |
Take relative abundances into account. When
|
layers |
One or more of
|
stat.by |
The categorical or numeric metadata field over which statistics should be calculated. Required. |
facet.by |
Dataset field(s) to use for faceting. Must be categorical.
Default: |
colors |
How to color the groups. Options are:
See "Aesthetics" section below for additional information.
Default: |
shapes |
Shapes for each group.
Options are similar to |
tree |
A |
test |
Permutational test for accessing significance. Options are:
Abbreviations are allowed. Default: |
seed |
Random seed for permutations. Must be a non-negative integer.
Default: |
permutations |
Number of random permutations to use.
Default: |
rank |
What rank(s) of taxa to display. E.g. |
taxa |
Which taxa to display. An integer value will show the top n
most abundant taxa. A value 0 <= n < 1 will show any taxa with that
mean abundance or greater (e.g. |
p.top |
Only display taxa with the most significant differences in
abundance. If |
p.adj |
Method to use for multiple comparisons adjustment of
p-values. Run |
unc |
How to handle unclassified, uncultured, and similarly ambiguous taxa names. Options are:
Abbreviations are allowed. Default: |
caption |
Add methodology caption beneath the plot.
Default: |
underscores |
When parsing the tree, should underscores be kept as
is? By default they will be converted to spaces (unless the entire ID
is quoted). Default |
... |
Parameters for layer geoms (e.g. |
A ggplot2
plot.
The computed sample coordinates and ggplot command
are available as $data
and $code
respectively.
If stat.by
is given, then $stats
and
$stats$code
are set.
If rank
is given, then $data$taxa_coords
,
$taxa_stats
, and $taxa_stats$code
are set.
Other beta_diversity:
bdiv_boxplot()
,
bdiv_clusters()
,
bdiv_corrplot()
,
bdiv_heatmap()
,
bdiv_ord_table()
,
bdiv_stats()
,
bdiv_table()
,
distmat_stats()
Other ordination:
bdiv_ord_table()
,
distmat_ord_table()
Other visualization:
adiv_boxplot()
,
adiv_corrplot()
,
bdiv_boxplot()
,
bdiv_corrplot()
,
bdiv_heatmap()
,
plot_heatmap()
,
rare_corrplot()
,
rare_multiplot()
,
rare_stacked()
,
stats_boxplot()
,
stats_corrplot()
,
taxa_boxplot()
,
taxa_corrplot()
,
taxa_heatmap()
,
taxa_stacked()
library(rbiom)
biom <- rarefy(hmp50)
bdiv_ord_plot(biom, layers="pemt", stat.by="Body Site", rank="g")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.