head(mydata) mydata = Crime view = (mydata) str(mydata) index = sample(2,nrow(mydata),replace = TRUE,prob = c(1,494)) RFM = randomForest (STATE_UT~.,data = Training)
I'm new to r programming, this error is shown when creating random forest algo for crime prediction..Can anyone help me out??
ERROR
Error in eval(predvars, data, env): object 'STATE_UT' not found
Well, the error message is telling you that that there is no column named STATE_UT in Training nor is there a object in the global environment called STATE_UT
colnames(Training)
will tell you what columns are in the Training object and
ls()
will tell you what objects are available in the global environment
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.