Skip to content
Prev 148804 / 398498 Next

Multiple time series plots

Incompatability?  zoo can work with any date/time class that supports
certain methods and such methods have specifically been written
for fCalendar's timeDate class.  In fact there is a section in
vignette("zoo") on the timeDate class.

Also we can readily convert between fSeries' timeSeries class and
zoo and the xts package provides a class, xts, which further supports
this.

Here is some sample code:

library(fCalendar)
dts <- c("1989-09-28", "2001-01-15", "2004-08-30", "1990-02-09")
tms <- c(  "23:12:55",   "10:34:02",   "08:30:00",   "11:18:23")
td <- timeDate(paste(dts, tms), format = "%Y-%m-%d %H:%M:%S")

library(zoo)
z <- zoo(1:4, td)
zz <- merge(z, lag(z))
plot(zz)

library(fCalendar)
zz
as.timeSeries(zz)
as.zoo(as.timeSeries(zz))
On Wed, Jul 2, 2008 at 1:26 PM, Kerpel, John <John.Kerpel at infores.com> wrote: