Learn R Programming

EEM (version 1.1.1)

prcompname: Create name for prcomp result

Description

Create name for prcomp result

Usage

prcompname(prcompResult, PC, explvar = TRUE)

Arguments

prcompResult
output value from prcomp function
PC
PC number
explvar
(logical) show explained variance (%) or not

Value

String

Examples

Run this code
data(applejuice)
applejuice_uf <- unfold(applejuice) # unfold list into matrix
result <- prcomp(applejuice_uf) 
prcompname(result, 1)

Run the code above in your browser using DataLab