I am a bit confused about the different approaches taken to recycling in
plain data frames and zoo objects. When carrying out simple arithmetic,
dataframe seem to recycle single arguments, zoo objects do not. Here is an
example

> x <- data.frame(a=1:5*2, b=1:5*3)
> x
   a  b
1  2  3
2  4  6
3  6  9
4  8 12
5 10 15
> x$a/x$a[1]
[1] 1 2 3 4 5
> x <- zoo(x)
> x$a/x$a[1]
1
1
>

I feel understanding this difference would lead me to a greater
understanding of the zoo module!

Sean.

-- 
Sean Carmody
Twitter: http://twitter.com/seancarmody
Stable: http://mulestable.net/sean

The Stubborn Mule
Blog: http://www.stubbornmule.net
Forum: http://mulestable.net/

	[[alternative HTML version deleted]]

