I agree that the cost is one-time and really trivial to the whole, but zoo
will be getting faster soon, as more of the C code from xts gets pushed back
up into zoo:

> library(xts)
Loading required package: zoo
> z <- zoo(matrix(rnorm(1e6), nc=100), Sys.time()+1:1e4)
> x <- as.xts(z)

> system.time(as.list(z))
   user  system elapsed
  0.483   0.106   0.588
> system.time(as.list(x))
   user  system elapsed
  0.056   0.006   0.063

Point is, the cost isn't a concern, but it is going to shrink in the near
future anyway.

Jeff

On Tue, May 25, 2010 at 10:12 AM, Ajay Shah <ajayshah@mayin.org> wrote:

> On Tue, May 25, 2010 at 11:05:15AM -0400, Gabor Grothendieck wrote:
> > The majority of the time is taken by as.list.zoo, not by attach
> > itself.
>
> I agree. I just wanted to say that with data frames, attach() is
> free. With a zoo object, we're paying the cost of casting. So even
> though the syntax is seductive and elegant, at an underlying level
> there is a fundamental difference. (This happens often with R, it's
> not unique to this situation).
>
> --
> Ajay Shah
> http://www.mayin.org/ajayshah
> ajayshah@mayin.org
> http://ajayshahblog.blogspot.com
> <*(:-? - wizard who doesn't know the answer.
>
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



-- 
Jeffrey Ryan
jeffrey.ryan@insightalgo.com

ia: insight algorithmics
www.insightalgo.com

	[[alternative HTML version deleted]]

