[R-SIG-Finance] Timeseries data, lattice, and model formulas?
Gabor Grothendieck
ggrothendieck at gmail.com
Fri Jul 6 06:09:57 CEST 2007
On 7/5/07, icosa atropa <icos.atropa at gmail.com> wrote:
> Hello All,
>
> I'm using R for a rather large, multivariate timeseries dataset of ~4
> million records. So far I've divided the set and used conventional
> data frames with good success at visualizing, summary statistics, etc.
>
> I've experimented with dedicated timeseries packages like its and zoo
> for more complicated analysis, but support for things like factors,
Don't know what you are looking for with respect to factors but if you create
a zoo object from a factor it remembers where it came from:
> zf <- zoo(factor(c(1,1,2)))
> class(zf)
[1] "zoo"
> str(zf)
atomic [1:3] 1 1 2
- attr(*, "levels")= chr [1:2] "1" "2"
- attr(*, "oclass")= chr "factor"
- attr(*, "index")= int [1:3] 1 2 3
> lattice and
zoo explicitly supports lattice with xyplot.zoo, e.g.
library(zoo)
library(lattice)
example(xyplot.zoo)
> model formulas seems lacking. Am I missing something, or
In conjuction with dyn or dynlm zoo supports model formula:
library(dyn)
set.seed(1)
z <- zoo(rnorm(10))
dyn$lm(z ~ lag(z, -1))
More information about the R-SIG-Finance
mailing list