prcomp: Principal Components Analysis for "matter" Matrices

Description Usage Arguments Value Note Author(s) See Also Examples

Description

This method allows computation of a truncated principal components analysis of a matter_mat matrix using the implicitly restarted Lanczos method irlba.

Usage

1
2
## S4 method for signature 'matter_mat'
prcomp(x, n = 3, retx = TRUE, center = TRUE, scale. = FALSE, ...)

Arguments

x

A matter matrix.

n

The number of principal componenets to return, must be less than min(dim(x)).

retx

A logical value indicating whether the rotated variables should be returned.

center

A logical value indicating whether the variables should be shifted to be zero-centered, or a centering vector of length equal to the number of columns of x. The centering is performed implicitly and does not change the out-of-memory data in x.

scale.

A logical value indicating whether the variables should be scaled to have unit variance, or a scaling vector of length equal to the number of columns of x. The scaling is performed implicitly and does not change the out-of-memory data in x.

...

Additional options passed to irlba.

Value

An object of class ‘prcomp’. See ?prcomp for details.

Note

The 'tol' truncation argument found in the default prcomp method is not supported. In place of the truncation tolerance in the original function, the argument n explicitly gives the number of principal components to return. A warning is generated if the argument 'tol' is used.

Author(s)

Kylie A. Bemis

See Also

bigglm

Examples

1
2
3
4
5
set.seed(1)

x <- matter_mat(rnorm(1000), nrow=100, ncol=10)

prcomp(x)

Example output

Loading required package: biglm
Loading required package: DBI

Attaching package: 'matter'

The following objects are masked from 'package:base':

    apply, scale

Standard deviations (1, .., p=3):
[1] 1.269363 1.246694 1.187657

Rotation (n x k) = (10 x 3):
              PC1         PC2         PC3
 [1,]  0.22358717 -0.04384519 -0.03465806
 [2,]  0.18511020  0.01905189 -0.02862531
 [3,] -0.11992159  0.14134479 -0.54592323
 [4,]  0.02046621 -0.40902231 -0.23137567
 [5,]  0.72081289  0.07545634 -0.45209190
 [6,] -0.23548406 -0.04338255 -0.09948186
 [7,]  0.26021110  0.26169750  0.15836329
 [8,]  0.49579071 -0.03016529  0.46863222
 [9,]  0.10598111 -0.62346748 -0.28297706
[10,]  0.03418671 -0.58715764  0.32765486

matter documentation built on Nov. 8, 2020, 6:15 p.m.