dss_plot_pca: A wrapper for plotting a principal component analysis with...

View source: R/dss_plot_pca.R

dss_plot_pcaR Documentation

A wrapper for plotting a principal component analysis with confidence ellipses

Description

Two PCA plots (variables and individuals) are displayed for the reference dataset. On the individuals plot, confidence ellipses for both sexes can be added. The target individual is particularly highlighted.

Usage

dss_plot_pca(ref, imputed_ref, target,
             ellipses = c("none", "classical", "robust"),
             labels = FALSE)

Arguments

ref

dataframe of reference individuals, typically returned by dss_check_data.

imputed_ref

imputed dataframe of reference individuals, typically returned by dss_impute_missing.

target

1-row dataframe, target individual.

ellipses

character string; type of confidence ellipses to be displayed.

labels

boolean: should all individuals IDs be displayed on the plot?

Details

The PCA is computed after standardization of variables (all variables are scaled to unit variance upstream).

Value

No value is returned.

Note

This function is only a wrapper with quite limited facilities for customizing the plot. It is still possible to compute and plot the PCA directly with PCA for more options.

Author(s)

Frédéric Santos.

See Also

PCA


frederic-santos/rdss documentation built on March 25, 2023, 5:25 p.m.