Learn R Programming

PCA4you (version 1.2.4)

PCA.Filler: PCA.Filler

Description

Takes a matrix with NAs and returns a matrix without NAs. Takes data.mat and calculates and returns predicted data.mat. Uses by default a 2 component PCA model. No centering or scaling. Supports NAs and similar. Rownames/colnames are retained. Columns/rows with only NAs (or similar) are removed.

Usage

PCA.Filler(data.mat, num.of.pcs = 2)

Arguments

data.mat

a numeric matrix or data frame. Long, wide and squared matrix supported. NAs supported.

num.of.pcs

is an integer specifying the number of components to be used. Default 2.

Examples

Run this code
# NOT RUN {
data.mat <- airquality[, 1:4]
data.mat
PCA.Filler(data.mat)
# }

Run the code above in your browser using DataLab