[R] convert zoo object to "standard" R object so I can plot and output to csv file

Gabor Grothendieck ggrothendieck at gmail.com
Sat Feb 18 05:34:15 CET 2012


On Fri, Feb 17, 2012 at 2:56 PM, Henry <hccoles at lbl.gov> wrote:
> Another newbie question
> I got the 1 minute spine interpolation and 15 mean aggregation working with
> many thanks to Gabor Grothendieck using Zoo functions.  I got a tip from
> Hasan Diwan to look at xts but it seemed I would make better progress using
> code from Gabor.
>
> Now I'm having trouble plotting this zoo object.  I'm thinking I want a
> function to "split" the zoo object back to a regular R object with x time
> values and y values so I can plot using plot functions I'm familiar with.
>

If z is a zoo object then

plot(z)

or

library(lattice)
xyplot(z)

will plot it.  See ?plot.zoo and ?xyplot.zoo




-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list