How to pass a character vector in the train function caret R
问题 I want to reduce the number of variables when i train my model. I have a total of 784 features that I want to reduce to lets say 500. I can make a long string with the selected featuees with the Paste command collapsed with + to have a long string. For example, lets say this is my vector val <- "pixel40+pixel46+pixel48+pixel65+pixel66+pixel67" then I would like to pass it to the train function like so Rf_model <- train(label~val, data =training, method="rf", ntree=200, na.action=na.omit) but