If you want to do SVM, RF or whatever second classifier on top of the scores of your PCs, then there is a shortcut to that instead of trying to re-invent caret
package.
you can do the following:
set.seed(1)
sigDist <- sigest(RT..seconds.~., data = cadets100, frac = 1)
svmGrid <- expand.grid(.sigma = sigDist, .C = 2^(-2:7))
set.seed(2)
svmPCAFit <- train(RT..seconds.~.,
method = "svmRadial",
tuneGrid = svmrGrid,
preProcess = c("center","scale","pca"), # if center and scale needed
trControl = ctrl)
This way pca will be done on each fold of test, and scores will be used instead of observations for the SVM classifier. So you don't need to do it yourself, caret would do it for you automatically. All what you pass in the preProcess will by applied to the new data set whether be it a CV fold test or fitting the holdout test set.
However, if you want to perform PLS, which is a supervised method as opposed to PCA, before passing the scores to the next classifier, then you have to custom such a model in caret (see here). More on examples you can study the code here also, there you will find two custom models, one for PLS-RF, and PLS-LDA.