[R] leap years in temporal series command ts

Peter Zorglub peter.zorglub at gmail.com
Wed Feb 16 14:02:11 CET 2011


Hi R community!

I'd like to create a temporal series with ts command for the interval 
1st January 2002 - 31 December 2008. I have daily values, so this is a 
2557 days temporal series. I'm using this command :

     ts(observations, start=2002, end=2009, freq=365)

However, I don't get the correct temporal series since both frequency 
(365 OR 366 for leap years) and deltat (1/365 OR 1/366) are varying with 
the year considered.

So, is there a specific way to deal with leap years in the ts command or 
have I to use another package?


Thanks in advance,



Peter



More information about the R-help mailing list