title: Is there an R function for loading unprocessed observations into principal components?
body: <p>I have performed PCA and obtained loadings for components on the training data. Now I would like to apply the loading values for each column for each observation in the testing data so that I have the principal component values for each observation in the testing data based on the loadings obtained from the training data. Is there a function for this or do I need to write it myself?</p>