[R] Can ROC be used as a metric for optimal model selection for randomForest?

2011-05-12 Thread Jing Liu
Dear all, I am using the "caret" Package for predictors selection with a randomForest model. The following is the train function: rfFit<- train(x=trainRatios, y=trainClass, method="rf", importance = TRUE, do.trace = 100, keep.inbag = TRUE, tuneGrid = grid, trControl=bootControl, scale =

[R] Matching a pattern of vector of character strings in another vector of character strings

2010-12-17 Thread Jing Liu
t;0" and followed by a "1", i.e, exactly "0" "1". If it does, at which year? E.g. It should return 2006 for row 1, 2008 for row 2 and 2008 for row 3. For as far as I know, the variations of the grep function group cannot search for a pattern that has 2 or more