[R] Converting date variables to integers for regression
Mark Scarr
mscarr at excitehome.net
Wed Nov 28 23:23:28 CET 2001
Hi All,
I am performing some piecewise linear
regression where my X-variable is the date mm/dd/yyyy
stored as a character vector. I would like to convert this
to an integer vector so I can set up dummy variables for the knots
and then perform the regression. Alternatively is it possible to
work with date objects? I was able to use certain binary operators
such as "-" with date objects, but am uncertain if it is possible
to use such objects for regression?
Any help would be most appreciated.
Thanks in advance
Mark.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list