Performs PCA on the given data using base R.
Usage
RunPCA(data, scale = TRUE, center = TRUE, ncomp = NULL)
Arguments
- data
A data matrix or distance matrix.
- scale
Logical. Whether to scale variables (default: TRUE).
- center
Logical. Whether to center variables (default: TRUE).
- ncomp
Number of components to return (default: all).
Value
A list with class "prcomp" containing PCA results.
Author
Zaoqu Liu; Email: liuzaoqu@163.com