| grouped_ggcorrmat | R Documentation |
Helper function for ggstatsplot::ggcorrmat() to apply this function across
multiple levels of a given factor and combining the resulting plots using
ggstatsplot::combine_plots().
grouped_ggcorrmat(
data,
...,
grouping.var,
plotgrid.args = list(),
annotation.args = list()
)
data |
A data frame from which variables specified are to be taken. |
... |
Arguments passed on to
|
grouping.var |
A single grouping variable. A separate plot is created for each of its levels (in factor level order, or in order of appearance for character variables). Rows with a missing value in this variable are removed. |
plotgrid.args |
A |
annotation.args |
A |
Missing values are handled using pairwise deletion (each correlation uses all complete pairs of observations), in which case the legend shows the minimum, mode, and maximum sample size across pairs. Partial correlations use only complete cases.
For details, see: https://www.indrapatil.com/ggstatsplot/articles/web_only/ggcorrmat.html
A patchwork object combining one plot per level of
grouping.var (see combine_plots()).
ggcorrmat, ggscatterstats,
grouped_ggscatterstats
set.seed(123)
grouped_ggcorrmat(
data = iris,
grouping.var = Species,
type = "robust",
colors = c("#0072B2", "white", "#D55E00"),
p.adjust.method = "holm",
plotgrid.args = list(ncol = 1L),
annotation.args = list(tag_levels = "i")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.