Skip to contents

Evaluates the given pca components as a function.

Usage

pca_components(pca, components = 1:length(pca$sdev))

Arguments

pca

PCA object from pca()

components

Numeric for the components of interest. Can be a single numeric to examine that component or multiple to examine the combined result

Value

A dfts object of the pca component(s)

Examples

tmp <- pca(electricity, TVE = 0.1)
pca_components(tmp, components = 1)
#> t(val) 
#> dimension: 24 x 365
#> season: 1
#> fparam (24): 0 0.04347826 0.08695652 0.1304348 0.173913 0.2173913 ... 
#> labels (365): V1 V2 V3 V4 V5 V6 ... 
#> 
#> Example data
#>           [,1]     [,2]     [,3]      [,4]      [,5]      [,6]
#> [1,]  7.367963 25.81764 37.91032  6.603219  6.046029 13.825235
#> [2,]  2.346464 20.72198 32.76606  1.584795  1.029844  8.777782
#> [3,] -1.050398 16.90954 28.68124 -1.794842 -2.337242  5.235470
#> [4,] -1.794127 16.21806 28.02399 -2.540736 -3.084714  4.510026
#> [5,] -2.649973 15.24456 26.97338 -3.391705 -3.932130  3.613002
#> [6,] -2.467575 16.09265 28.25779 -3.236900 -3.797429  4.028387