Wednesday, 29 April 2015

R tip: caret error

If you get the following error when using the caret package:
Error in tab[1:m, 1:m] : subscript out of bounds
then ensure that your dependent variable is a factor and not anything else (e.g. a logical TRUE/FALSE vector).