[R] seriesMerge

Dirk Eddelbuettel edd at debian.org
Wed Nov 24 21:58:28 CET 2004


On Wed, Nov 24, 2004 at 03:29:53PM -0500, Yasser El-Zein wrote:
> Is there a function in R that is equivalent to S-PLUS's 
> seriesMerge(x1, x2, pos="union")
> where x1, and x2 are of class timeSeries
> 
> seriesMerge is in S-PLUS's finmetrics. I looked into R's mergeSeries
> (in fSeries part of Rmetrics) but I could not make it behave quite the
> same. In R it expected a timeSeries object and a matrix of the same
> row count. In S-PLUS when using the union option both objects can be
> of different lengths.

The its (short for irregular timeseries) package has union() and
intersect(). The zoo package also some functions for this, I think.

Topics like this get discussed a bit on the r-sig-finance list, you may want
to glance at the archives or do some conditional googleing.

Hth, Dirk

-- 
If your hair is standing up, then you are in extreme danger.
      -- http://www.usafa.af.mil/dfp/cockpit-phys/fp1ex3.htm




More information about the R-help mailing list