Description Usage Arguments Details Value See Also
lotri_corrtext()
and utri_corrtext()
are used to display
text labels for the strength of bivariate correlations in the off-diagonal
facets of ggcorrm plots.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | lotri_corrtext(
mapping = NULL,
nrow = NULL,
ncol = NULL,
digits = 2,
corr_size = TRUE,
corr_method = NULL,
squeeze = 0.5,
byrow = TRUE,
show.legend = FALSE,
...
)
utri_corrtext(
mapping = NULL,
nrow = NULL,
ncol = NULL,
digits = 2,
corr_size = TRUE,
corr_method = NULL,
squeeze = 0.5,
byrow = TRUE,
show.legend = FALSE,
...
)
|
mapping |
Set of aesthetic mappings created by aes. |
nrow |
integer - the number of rows for the correlation labels if
grouping aesthetics are present (defaults to |
ncol |
integer - the number of columns for the correlation labels if
grouping aesthetics are present (defaults to |
digits |
integer: Number of digits the correlations are rounded to (defaults to 2). |
corr_size |
logical - should the |
corr_method |
character string with the correlation method passed to
cor(). Can be one of |
squeeze |
numeric between 0 an 1. Proportion of the facet width/height the facet labels are restricted to when multiple labels are present (defaults to 0.7 - labels extend over 70% of the extent of the plot). |
byrow |
logical. Should the correlation labels in plots with multiple
groups be filled by rows ( |
show.legend |
logical. Should this layer be included in the legends? FALSE (the default) never includes, TRUE always includes, and NA includes only if aesthetics are mapped. It can also be a named logical vector to finely select the aesthetics to display. |
... |
Additional arguments to stat_corrtext. |
lotri_corrtext()
and utri_corrtext()
can be used to display the
correlation between variables in the lower or upper triangular facets of
ggcorrm
plots, respectively. Correlations can be calculated for single
groups by using grouping aesthetics such as aes(color = group)
.
lotri_corrtext()
and utri_corrtext()
are wrappers around
stat_corrtext()
that additionally take care of the right specification
of aesthetics and allows to easily adjust size by correlation strength via
corr_size
.
A ggplot2
layer with text labels for correlation strength.
stat_corrtext
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.