1

The following is my code (considering Date as continuous var):

rpart_object <- rpart(output ~ Date, data=file, cp=0.01) 

when I just output the object:

rpart_object

The date values are not rounded off, but say I am trying to extract something specific like:

path.rpart(rpart_object, nodes=3 , print.it=TRUE) 

Then the date values in the rpart is rounded off in scientific notation. I am losing a lot of information due to this.

Can anyone please let me know how to prevent from not rounding off by R in this case. Also I am aware of scipen.

smci
  • 29,564
  • 18
  • 109
  • 144
Shiva Prakash
  • 1,699
  • 3
  • 19
  • 25

0 Answers0