ggscatmat | R Documentation |
This function makes a scatterplot matrix for quantitative variables with density plots on the diagonal and correlation printed in the upper triangle.
ggscatmat(
data,
columns = 1:ncol(data),
color = NULL,
alpha = 1,
corMethod = "pearson"
)
data |
a data matrix. Should contain numerical (continuous) data. |
columns |
an option to choose the column to be used in the raw dataset. Defaults to |
color |
an option to group the dataset by the factor variable and color them by different colors.
Defaults to |
alpha |
an option to set the transparency in scatterplots for large data. Defaults to |
corMethod |
method argument supplied to |
Mengjia Ni, Di Cook
# small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive
data(flea)
p_(ggscatmat(flea, columns = 2:4))
p_(ggscatmat(flea, columns = 2:4, color = "species"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.