pcApprox: PC Approximation

Description Usage Arguments Details Examples

View source: R/pcApprox.R

Description

returns an approximation to the data based on a number of principal components

Usage

1
pcApprox(x, npc)

Arguments

x

a tibble or dataframe

npc

number of principal components to use in estimate

Details

takes a tibble or dataframe, a number of principal components to include, and returns an n x m dimensional estimate such that n is the number of observations and m = npc

Examples

1
2
X <- tibble(iris[,-which(names(iris)=="Species")]) #iris dataset without species
pcApprox(X, 2)

frankchien/bmi585flc documentation built on Dec. 20, 2021, 8:51 a.m.