I'm trying to run PCA in R for dimension reduction. As a result of this procedure I choose 25 out of 2000 features. but I cannot figure out how to map these selected features to the ones of the original data. Any help please?
here is a part of my code :
rawdata <- read.csv("alon.csv", header = FALSE)
pmatrix <- scale(rawdata)
princ <- prcomp(pmatrix)
nComp <- 25
dfComponents <- predict(princ, newdata = pmatrix)[, 1:nComp]
and here is 3 rows and 6 columns of my 62*2000 data:
0.508777205 0.229010718 0.092779946 0.038210585 -0.692175368 0.240419603
0.694627686 0.800665661 0.433820868 -0.133540337 -0.679403925 0.36020227
-1.031396049 0.91525797 0.701421715 0.355537228 -1.30483618 -1.304934251