The orthogonal linear components of the variables in the next largest direction of variance.

basis_pca(data, d = 2)

Arguments

data

Numeric matrix or data.frame of the observations.

d

Number of dimensions in the projection space.

See also

Rdimtools::do.pca

Other basis producing functions: basis_guided(), basis_half_circle(), basis_odp(), basis_olda(), basis_onpp()

Examples

dat_std <- scale_sd(wine[, 2:6])
basis_pca(data = dat_std)
#>                   PC1        PC2
#> Alcohol    0.09339195  0.6578986
#> Malic      0.42873573 -0.1335841
#> Ash        0.65072062  0.1843494
#> Alcalinity 0.57844161 -0.4342966
#> Magnesium  0.22233218  0.5715999