ggpairs {opticskxi} | R Documentation |
Plot multiple axes of a data frame or a fortified dimension reduction.
Description
Plot multiple axes of a data frame or a fortified dimension reduction.
Usage
ggpairs(df_data, group = NULL, axes = 1:2, variables = FALSE,
n_vars = 0, ellipses = FALSE, ..., title = NULL, colors = if
(!is.null(group)) nice_palette(df_data[[group]]))
Arguments
df_data |
Data frame |
group |
Column name of the grouping of observations |
axes |
Axes to plot. If more than 2, plots all pair combinations |
variables |
Logical, plot variable contributions of the dimension reduction to the selected axes, only for 2 axes |
n_vars |
Maximum number of variable contributions to plot. By default 0, for all variables. |
ellipses |
Logical, plot ellipses of groups |
... |
Passed to ggplot2 stat_ellipse if ellipses are requested |
title |
String to add as title, default NULL |
colors |
Vector of colors for each group |
Value
ggmatrix
See Also
Examples
df_pca <- fortify_pca(iris[-5])
ggpairs(df_pca)
df_pca <- fortify_pca(iris[-5], sup_vars = iris[5])
ggpairs(df_pca, group = 'Species', ellipses = TRUE, variables = TRUE)
[Package opticskxi version 0.1 Index]