ggpairs: Plot multiple axes of a data frame or a fortified dimension...

Description Usage Arguments Value See Also Examples

View source: R/ggpairs.R

Description

Plot multiple axes of a data frame or a fortified dimension reduction.

Usage

1
2
3
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

fortify_pca, fortify_ica

Examples

1
2
3
4
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)

opticskxi documentation built on July 19, 2019, 1:02 a.m.