taxa_corrplot | R Documentation |
Visualize taxa abundance with scatterplots and trendlines.
taxa_corrplot(
biom,
x,
rank = -1,
layers = "tc",
taxa = 6,
lineage = FALSE,
unc = "singly",
other = FALSE,
stat.by = NULL,
facet.by = NULL,
colors = TRUE,
shapes = TRUE,
test = "emmeans",
fit = "gam",
at = NULL,
level = 0.95,
p.adj = "fdr",
transform = "none",
ties = "random",
seed = 0,
alt = "!=",
mu = 0,
caption = TRUE,
check = FALSE,
...
)
biom |
An rbiom object, such as from |
x |
Dataset field with the x-axis values. Equivalent to the |
rank |
What rank(s) of taxa to display. E.g. |
layers |
One or more of
|
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. |
lineage |
Include all ranks in the name of the taxa. For instance,
setting to |
unc |
How to handle unclassified, uncultured, and similarly ambiguous taxa names. Options are:
Abbreviations are allowed. Default: |
other |
Sum all non-itemized taxa into an "Other" taxa. When
|
stat.by |
Dataset field with the statistical groups. Must be
categorical. Default: |
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 |
test |
Method for computing p-values: |
fit |
How to fit the trendline. |
at |
Position(s) along the x-axis where the means or slopes should be
evaluated. Default: |
level |
The confidence level for calculating a confidence interval.
Default: |
p.adj |
Method to use for multiple comparisons adjustment of
p-values. Run |
transform |
Transformation to apply. Options are:
|
ties |
When |
seed |
Random seed for permutations. Must be a non-negative integer.
Default: |
alt |
Alternative hypothesis direction. Options are |
mu |
Reference value to test against. Default: |
caption |
Add methodology caption beneath the plot.
Default: |
check |
Generate additional plots to aid in assessing data normality.
Default: |
... |
Additional parameters to pass along to ggplot2 functions.
Prefix a parameter name with a layer name to pass it to only that
layer. For instance, |
A ggplot2
plot. The computed data points, ggplot2 command,
stats table, and stats table commands are available as $data
,
$code
, $stats
, and $stats$code
, respectively.
All built-in color palettes are colorblind-friendly. The available
categorical palette names are: "okabe"
, "carto"
, "r4"
,
"polychrome"
, "tol"
, "bright"
, "light"
,
"muted"
, "vibrant"
, "tableau"
, "classic"
,
"alphabet"
, "tableau20"
, "kelly"
, and "fishy"
.
Shapes can be given as per base R - numbers 0 through 17 for various shapes, or the decimal value of an ascii character, e.g. a-z = 65:90; A-Z = 97:122 to use letters instead of shapes on the plot. Character strings may used as well.
Other taxa_abundance:
sample_sums()
,
taxa_boxplot()
,
taxa_clusters()
,
taxa_heatmap()
,
taxa_stacked()
,
taxa_stats()
,
taxa_sums()
,
taxa_table()
Other visualization:
adiv_boxplot()
,
adiv_corrplot()
,
bdiv_boxplot()
,
bdiv_corrplot()
,
bdiv_heatmap()
,
bdiv_ord_plot()
,
plot_heatmap()
,
rare_corrplot()
,
rare_multiplot()
,
rare_stacked()
,
stats_boxplot()
,
stats_corrplot()
,
taxa_boxplot()
,
taxa_heatmap()
,
taxa_stacked()
library(rbiom)
biom <- rarefy(subset(hmp50, `Body Site` %in% c('Buccal mucosa', 'Saliva')))
taxa_corrplot(biom, x = "BMI", stat.by = "Body Site", taxa = 'Streptococcus')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.