[R] ts.intersect bug?

Martin Maechler maechler at stat.math.ethz.ch
Wed Sep 21 15:10:16 CEST 2005


>>>>> "AntonioFDN" == Antonio, Fabio Di Narzo <antonio.fabio at gmail.com>
>>>>>     on Wed, 21 Sep 2005 13:59:26 +0200 writes:

    AntonioFDN> This code gives an error:

    AntonioFDN> a <- ts(1:10, start=0, freq=10)
    AntonioFDN> b <- ts(1:10, start=1, freq=10)
    AntonioFDN> ts.intersect(a,b)

No, it gives a *warning* and returns NULL.

Why should it not?  a and b  have are not overlapping,
ie. *have* intersection NULL :

  plot(c(0,2), c(0,10), type ="n") ; lines(a); lines(b,col=2)


I think you misunderstand what 'freq' means in the current
context.

    AntonioFDN> This one works normally (and correctly):
    AntonioFDN> a <- ts(1:10, start=0)
    AntonioFDN> b <- ts(1:10, start=1)
    AntonioFDN> ts.intersect(a,b)

    AntonioFDN> Antonio, Fabio Di Narzo.

    AntonioFDN> P.S. How to switch off italian error messages to post on r-help?

    >> version
    AntonioFDN> _
    AntonioFDN> platform i386-pc-mingw32
    AntonioFDN> arch     i386
    AntonioFDN> os       mingw32
    AntonioFDN> system   i386, mingw32
    AntonioFDN> status
    AntonioFDN> major    2
    AntonioFDN> minor    1.0
    AntonioFDN> year     2005
    AntonioFDN> month    04
    AntonioFDN> day      18
    AntonioFDN> language R

    AntonioFDN> ______________________________________________
    AntonioFDN> R-help at stat.math.ethz.ch mailing list
    AntonioFDN> https://stat.ethz.ch/mailman/listinfo/r-help
    AntonioFDN> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list