pca: pca

Description Usage Arguments Examples

Description

Perform principal components analysis.

Usage

1
stats_pca(rm_mean = TRUE, rm_sd = FALSE, x, sdev, rot = NULL)

Arguments

rm_mean, rm_sd

Should the data be centered/scaled first? Operations occur in-place.

x

Input matrix. The input values are overwritten.

sdev

The standard deviations for the principal components.

rot

The pca loadings. If NULL is passed, then these will not be calculated.

Examples

1
2
3
4
5
6
7
8
suppressMessages(library(fmlr))
x = cpumat(3, 2)
x$fill_linspace(1, 6)

s = cpuvec()
stats_pca(TRUE, TRUE, x, s)
s$info()
s$print()

wrathematics/fmlr documentation built on Jan. 17, 2022, 4:10 p.m.