calcPCA: Calculate PCA and associated statistics.

calcPCAR Documentation

Calculate PCA and associated statistics.

Description

Calculate PCA

Usage

calcPCA(grid, centre = TRUE, scale, r = ncol(grid))

Arguments

grid

matrix or dataframe. If a dataframe, then the numeric columns are selected and converted to a matrix.

centre, scale

logical. If TRUE, then the matrix has its mean subtracted (centre) and/or has each column divided by its sd (scale). If scale = TRUE and the sd of a column is 0, then that column is not divided by its sd and a message is printed.

r

integer. The number of principal compononents to show information for. Defaults to ncol(grid).

Value

A list containing elements:

VJMat matrix of eigenvectors
YMat matrix of principal component scores
singValVec vector of singular values
cumPropVarVec vector of cumulative proportion of variation
compPropVarVec vector of component-wise proportion of variation

MiguelRodo/ggboot documentation built on Nov. 9, 2023, 5:45 p.m.