Principal Components Analysis

Share:

Description

Performs the principal components analysis.

Usage

1
2
3
4
5
prcomp(x, ...)

## S4 method for signature 'ddmatrix'
prcomp(x, retx = TRUE, center = TRUE, scale. = FALSE,
  tol = NULL, ...)

Arguments

x

numeric distributed matrix.

...

Ignored.

retx

logical, indicates whether the rotated variables should be returned

center

logical value, determines whether or not columns are zero centered

scale.

logical value, determines whether or not columns are rescaled to unit variance

tol

a value indicating the magnitude below which components should be omitted. (Components are omitted if their standard deviations are less than or equal to tol times the standard deviation of the first component.) With the default null setting, no components are omitted. Other settings for tol could be tol = 0 or tol = sqrt(.Machine$double.eps), which would omit essentially constant components

Details

prcomp() performs the principal components analysis on the data matrix by taking the SVD. Sometimes core R and pbdDMAT will disagree slightly in what the rotated variables are because of how the SVD is caluclated.

Value

Returns a list.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r

library(pbdDMAT, quiet = TRUE)
init.grid()

comm.set.seed(diff=T)

x <- ddmatrix("rnorm", 10, 10)

y <- prcomp(x)
comm.print(y)

finalize()

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.