[R] ZOO objects: Creating, Plotting, Analyzing
Rich Shepard
rshepard at appl-ecosys.com
Thu Mar 20 03:02:21 CET 2014
On Thu, 20 Mar 2014, Achim Zeileis wrote:
> It's sufficient to send such messages once even if others don't reply within
> minutes.
Achim,
I sent it but my postfix spam filter would not let it out. There should
have been only a single copy.
> Please have a look at read.zoo() and the accompanying "read.zoo" vignette
> which does exactly what you are looking for (reading .csv files and
> turning it into a zoo series).
Thank you, I'll do that. I missed that help file and vignette.
> Yes. The first argument should be a numeric vector or matrix and the
> second argument should be something suitable as a time index. In your case
> s95.ec is a data.frame with two "character" columns which is not suitable
> directly. This works:
>
> s95.ec.z <- zoo(as.numeric(s95.ec[,2]), order.by = as.Date(s95.ec[,1]))
> plot(s95.ec.z)
>
> But the route via read.zoo should be more convenient, I guess.
That clarifies my mis-understanding. I'll read about read.zoo, too.
Thank you,
Rich
More information about the R-help
mailing list