Entering edit mode
6.1 years ago
johnnytam100
▴
110
I want to get the loadings of components from pcaMethods.
To illustrate the problem, I have a matrix x
a b c
1 ... ... ...
2 ... ... ...
3 ... ... ...
By loadings(pca(x, method="nipals", nPcs=2))
, I get
PC1 PC2
a ... ...
b ... ...
c ... ...
However, I want to get
PC1 PC2
1 ... ...
2 ... ...
3 ... ...
Anyone knows how to do that?
Thanks a lot!
Good idea! I had a similar thought but does it work for a PCA analysis that we just swap the columns and rows?