Streams a subset of observations through the PCA rotation and plots their scores on the requested components. Sampling keeps the drawn subset small so graphics remain interpretable even when the source big matrix contains millions of rows.
Arguments
- x
Either a
bigmemory::big.matrix
, a standard matrix, or a data frame.- rotation
A rotation matrix such as
pca_result$rotation
.- center
Optional centering vector. Use
numeric()
when no centering was applied.- scale
Optional scaling vector. Use
numeric()
when no scaling was applied.- components
Length-two integer vector selecting the principal components to display.
- max_points
Maximum number of observations to sample for the plot.
- sample
Strategy for selecting rows.
"uniform"
draws a random sample without replacement, whereas"head"
takes the firstmax_points
rows.- seed
Optional seed to make the sampling reproducible.
- draw
Logical; set to
FALSE
to skip plotting and only return the sampled scores.- ...
Additional graphical parameters forwarded to
plot()
.