Description Usage Arguments Value Examples
View source: R/visualization-utils.R
This is a wrapper to the GGally
based pairs plot of a list of variables
displayed as scatterplots for pairs of continuous variables, density functions in
the diagonal, and boxplots for pairs of continuous and categorical variables.
Optionally, a by
categorical variable can be provided.
1 | pairs_plot(variables, data, by = NULL)
|
variables |
A vector of variable names |
data |
The data frame. |
by |
An optional variable, usually categorical (factor or character), by which the data are grouped and coloured. |
A GGally::ggpairs
plot.
1 2 3 4 5 6 7 | # A simple pairs plot
pairs_plot(variables = c("sex_dimorph", "attractive"),
data = faithfulfaces)
# A pairs plot with grouping variable
pairs_plot(variables = c("sex_dimorph", "attractive"),
by = face_sex,
data = faithfulfaces)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.