[R-SIG-Finance] can I 'attach' a zoo object?

Matthieu Stigler matthieu.stigler at gmail.com
Tue May 25 15:11:12 CEST 2010


Hi

When importing a big data frame, I like to "attach" its variables so 
they are direclty available. I don't see how to do this with zoo... Does 
anyone has an idea how I could do that?

Take a zoo object:

library(zoo)

zooframe<-matrix(runif(3*26), nrow=3, dimnames=list(letters[1:3], paste("var", letters, sep="")))

zoo1 <-zoo(zooframe, order.by=as.Date("2003-02-01") + c(1, 

3, 7))


Can I 'attach' it, so its variables become accessible to user workspace?

attach(zoo1)

#does not work...

Thanks!



More information about the R-SIG-Finance mailing list