Hi All,
Seeking for help.
When i am trying to run this script, an error occur when running this statement. PredictedTerminatedEmployees2016<-subset(ActiveEmployees2016,PredictedSTATUS2016=='TERMINATED')
How can i rectify this statement and error to make it works?
#Apply model
#Generate 2016 data
Employees2016<-MYtest #2015 dataActiveEmployees2016<-subset(Employees2016,STATUS=='ACTIVE')
ActiveEmployees2016$age<-ActiveEmployees2016$age+1
ActiveEmployees2016$length_of_service<-ActiveEmployees2016$length_of_service+1
ActiveEmployees2016$PredictedSTATUS2016<-predict(MYrpart,ActiveEmployees2016)
PredictedTerminatedEmployees2016<-subset(ActiveEmployees2016,PredictedSTATUS2016=='TERMINATED')
Error in xj[i, , drop = FALSE] : (subscript) logical subscript too long
The data structure is
Regards,
Ernest