Skip to contents

Visualises the correlation between each variable and a pair of principal components. The variables are projected onto the unit circle, where points near the perimeter indicate strong correlation with the selected components.

Usage

pca_plot_correlation_circle(
  correlations,
  components = c(1L, 2L),
  labels = NULL,
  draw = TRUE,
  ...
)

Arguments

correlations

Matrix or bigmemory::big.matrix containing variable correlations, typically produced by pca_variable_correlations().

components

Length-two integer vector specifying the principal components to display.

labels

Optional character vector specifying the labels to display for each variable. When NULL, the row names of correlations are used when available.

draw

Logical; set to FALSE to return the prepared coordinates without plotting.

...

Additional graphical parameters passed to graphics::plot().

Value

A data frame with variable, PCx, and PCy columns representing the projected correlations, where PCx/PCy correspond to the requested component indices. The data frame is returned invisibly.