InseadDataAnalytics / INSEADAnalytics

Other
122 stars 1.31k forks source link

Problem in running ctree #96

Closed AndreaSiri closed 6 years ago

AndreaSiri commented 6 years ago

Dear all,

During class I tried to run the ctree but it gives me the following error:

ctree_tree<-ctree(Retained.in.2012.~.,data=training) #Run ctree on training data Error in inum.default(x, nmax = nmax, ...) : cannot handle objects of class ‘Date’

Do you have any idea why is this the case? I intalled all the required packages of both two codes discussed in class.

Thank you, Andrea

Antoine-Engerand commented 6 years ago

Hi Andrea, did you try converting your columns of type 'Date' into factors? Antoine

AndreaSiri commented 6 years ago

Hey Antoine,

Thank you, apparently it works, I do not know why but it does not read the date field.

Best, Andrea