[R-SIG-Finance] recommended zoo merge for multiple objects
zubin
binabina at bellsouth.net
Fri Oct 9 19:49:02 CEST 2009
Thx!
One question: Will cbind use the time index? I want to make sure
everything lines up, as i have lags in the data.
Brian G. Peterson wrote:
> 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
>
More information about the R-SIG-Finance
mailing list