performPCA: Perform principal component analysis after processing missing...

View source: R/analysis_dimReduction_pca.R

performPCAR Documentation

Perform principal component analysis after processing missing values

Description

Perform principal component analysis after processing missing values

Usage

performPCA(
  data,
  center = TRUE,
  scale. = FALSE,
  missingValues = round(0.05 * nrow(data)),
  ...
)

Arguments

data

an optional data frame (or similar: see model.frame) containing the variables in the formula formula. By default the variables are taken from environment(formula).

center

a logical value indicating whether the variables should be shifted to be zero centered. Alternately, a vector of length equal the number of columns of x can be supplied. The value is passed to scale.

scale.

a logical value indicating whether the variables should be scaled to have unit variance before the analysis takes place. The default is FALSE for consistency with S, but in general scaling is advisable. Alternatively, a vector of length equal the number of columns of x can be supplied. The value is passed to scale.

missingValues

Integer: number of tolerated missing values per column to be replaced with the mean of the values of that same column

...

Arguments passed on to stats::prcomp

Value

PCA result in a prcomp object

See Also

Other functions to analyse principal components: calculateLoadingsContribution(), plotPCA(), plotPCAvariance()

Examples

performPCA(USArrests)

nuno-agostinho/psichomics documentation built on Feb. 11, 2024, 11:16 p.m.