[R] handling dates in R

Pijus Virketis pvirketis at hbk.com
Wed Aug 28 17:47:48 CEST 2002


Dear all,

I am just getting into R, and I arrive with a task in hand. I need to handle time series of price data, and use them in regressions and cluster models of various kinds. At this time, I am just trying to learn the most graceful ways of working with date-indexed data in R in general. 

I know of the ts object; however, it seems to assume a very regular periodicity of the data. Unfortunately, price data is usually available not for 7 days a week but for 5, and with omissions for trading holidays, etc. 

What is the best way to represent this in a ts object? Also, other languages I have worked with have libraries to do things such as date comparison, to derive the day of the week from a date, etc. Does R have such a facility? Or should I farm a task like that to an external tool, such as Python or Perl?

Thanks!

Pijus

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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