[R-SIG-Finance] xts time series object - merge

Gabor Grothendieck ggrothendieck at gmail.com
Mon Sep 29 06:39:55 CEST 2008


See ?last or ?window.zoo

Be sure to read the xts vignette and the 3 zoo vignettes.

On Mon, Sep 29, 2008 at 12:09 AM, zubin <zubin at dowlaty.com> wrote:
> I did notice the merge produces a 'zoo' object.  How would i subset this new
> zoo object by date, i like to use the subset command similar to
> chartSeries,  where you state for example: 'last 4 months'?
>
>          UYG.Close GLD.Close VIX.Close
> 2007-01-03        NA     62.28     12.04
> 2007-01-04        NA     61.65     11.51
> 2007-01-05        NA     60.17     12.14
> 2007-01-08        NA     60.48     12.00
> 2007-01-09        NA     60.85     11.91
> 2007-01-10        NA     60.59     11.47
>
> zubin wrote:
>
> Sweet, this works well!  thx
>
>
> Gabor Grothendieck wrote:
>
> Try this:
> library(quantmod)
> getSymbols(c("GOOG", "IBM", "MSFT"))
> tech <- merge(GOOG, IBM, MSFT)
> ?merge.zoo
> On Sun, Sep 28, 2008 at 11:07 PM, zubin <binabina at bellsouth.net> wrote:
>
>
> Hello, using R to extract data from yahoo using getSymbols.  I have a few
> sets of symbols I need to merge together to conduct some modeling.  How does
> one merge multiple xts data objects into one equivalent data frame
> representation so I can explore and model>?
>
>
>



More information about the R-SIG-Finance mailing list