My question is how to use the principal components obtained using R.
Once you get the principal components, how do we use it to reduce the dimensions? I have a data_set containing 6 variables, I need to cluster it using k-means. K-means gives me a scattered plot when I do the clustering on 6 variables. I thought pca could help to reduce the dimensions, and so k-means could produce fruitful results.
I did this to get the principal components:
pca1 <- prcomp(data_set)
Please guide me as to how to proceed further to reduce the dimensionality of the data set.