pca: Ordinary Principal Components Analysis

Description Usage Arguments Value Examples

View source: R/PCAandFA.R

Description

This is simply an alternative to R's principal and prcomp functions.

Usage

1
2
3
4
5
6
pca(
  x,
  ncomp = min(nrow(x) - 1, ncol(x)),
  scale = TRUE,
  method = c("dc", "std")
)

Arguments

x

a matrix or data frame containing only numeric variables

ncomp

the number of components to retain.

scale

should the variables be scaled prior to analysis? Defaults to TRUE.

method

the svd algorithm to use, one of "dc" and "std" corresponding to the divide-and-conquer (the default here) and standard algorithm.

rotate

a rotation function from the GPArotation package. Defaults to none.

Value

an object of class PrincipalComp

Examples

1
pca(x, 3)

abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.