Get Top Features by PCA Dimension
get_top_pca_rotation.Rd
Interrogates the rotation in each dimension defined by dims
and orders the features by the value of the principal
components in that dimension. Each dimension is
represented by a column of the resulting data frame.
Value
A data frame of the top features ordered by the principal components given in the selected dimension.
Examples
pca <- pca(pcapkg:::log10_ft(simdata))
get_top_pca_rotation(pca, n = 10L)
#> # A tibble: 10 × 5
#> PC1 PC2 PC3 PC4 PC5
#> <chr> <chr> <chr> <chr> <chr>
#> 1 7 5 8 36 31
#> 2 9 33 37 37 19
#> 3 10 23 14 32 14
#> 4 15 4 27 39 40
#> 5 6 22 38 3 21
#> 6 19 3 28 28 33
#> 7 37 13 20 21 22
#> 8 29 30 18 6 9
#> 9 5 18 25 24 1
#> 10 22 35 4 33 11