The small test set of ATMs was causing plyr via ddply to pass empty data to the training function since the test set does not contain all of the ATMs. This is because 'atm' is a factor.