Get PCA Loadings in Wide Format
Value
A tibble with one row per variable and one column per principal component, containing the loading values.
Examples
# \donttest{
pca <- tidy_pca(USArrests)
get_pca_loadings(pca, n_components = 2)
#> # A tibble: 4 × 3
#> variable PC1 PC2
#> <chr> <dbl> <dbl>
#> 1 Murder -0.536 -0.418
#> 2 Assault -0.583 -0.188
#> 3 UrbanPop -0.278 0.873
#> 4 Rape -0.543 0.167
# }
