[R-SIG-Finance] How do I intersecttwo time series?
Jeff Ryan
jeff.a.ryan at gmail.com
Tue Jan 24 03:32:27 CET 2012
Try:
?merge.xts
You want join="inner" if I have been following this.
Jeff
Jeffrey Ryan | Founder | jeffrey.ryan at lemnica.com
www.lemnica.com
On Jan 23, 2012, at 7:02 PM, "Brian G. Peterson" <brian at braverock.com> wrote:
> On Mon, 2012-01-23 at 18:58 -0600, Michael wrote:
>> Yes, but merge creates a bunch of "NA"s ... and we are not merging but
>> doing "intersections"? I cannot seem to find a way to use "merge" to
>> do "intersections"... I have searched/googled numerous times...
>> Maybe there is something I am missing and a trick?
>
> Those NA's exist because one series has a timestamp and the other
> doesn't. Normally, that's what you want.
>
> na.omit(merge(x,y))
>
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
More information about the R-SIG-Finance
mailing list