Re: [R] how to create daily / weekly ts object?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 26 Jan 2007 - 16:20:46 GMT

If you want the dates to show up as such you are better off using a zooreg object with times of class "Date" from the zoo package. You can always use as.ts on it if you require a ts object.

library(zoo)
zd <- zooreg(1:10, start = Sys.Date())
zd
as.ts(zd)
plot(zd)

zw <- zooreg(1:10, start = Sys.Date(), delta = 7) zw
as.ts(zw)

plot(zw, type = "p")
points(zd, pch = "+")

vignette("zoo")

On 1/26/07, Wensui Liu <liuwensui@gmail.com> wrote:
> Dear All,
>
> Monthly and Quarterly ts obj. is easy to understand. But I couldn't
> find an example in R manual how to create daily or weekly ts object.
> Could you please shed some light on it?
> I really appreciate it.
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat Jan 27 03:41:12 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 26 Jan 2007 - 17:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.