[R-SIG-Finance] recommended zoo merge for multiple objects
Brian G. Peterson
brian at braverock.com
Fri Oct 9 19:46:05 CEST 2009
zubin wrote:
> Hello, i have about 20 objects, each object is a zoo object, a ticker
> symbol.
>
> I am using merge.zoo to merge 2 objects successfully and using return
> class to create a data frame. However it looks like merge.zoo can only
> handle 2 objects. What's the recommended approach to merge multiple zoo
> objects by the time index into a data frame?
>
> example of 2 objects:
>
> df <- merge.zoo(XLF,SPY,all=TRUE, retclass="data.frame")
> where XLF and SPY are zoo objects.
>
>
Use cbind with xts. xts extends zoo, and should be preferred for
financial time series.
Regards,
- Brian
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the R-SIG-Finance
mailing list