Combines principal component scores and variable loadings in a single
scatter plot. The helper accepts both standard matrices and
bigmemory::big.matrix inputs, extracting only the requested component
columns. When draw = TRUE, the function scales the loadings to match the
score ranges, draws optional axes, overlays loading arrows, and labels
observations when requested.
pca_plot_biplot(
scores,
loadings,
components = c(1L, 2L),
draw = TRUE,
draw_axes = TRUE,
draw_arrows = TRUE,
label_points = FALSE,
...
)A list containing the selected components, extracted scores,
original loadings, scaled loadings (loadings_scaled), and the applied
scale_factor. The list is returned invisibly. When draw = TRUE, a biplot
is produced using base graphics.
Matrix or bigmemory::big.matrix containing principal
component scores with observations in rows and components in columns.
Matrix or bigmemory::big.matrix of variable loadings whose
columns correspond to principal components.
Integer vector of length two selecting the components to display.
Logical; set to FALSE to return the prepared data without
plotting.
Logical; when TRUE, horizontal and vertical axes are
drawn through the origin.
Logical; when TRUE, loading arrows are rendered.
Logical; when TRUE, point labels derived from row names
are drawn next to the scores.
Additional graphical parameters passed to graphics::plot().