[Rd] diff.default / diff.ts in wrong package bug (PR#640)

maechler@stat.math.ethz.ch maechler@stat.math.ethz.ch
Fri, 15 Sep 2000 17:24:46 +0200 (MET DST)

>>>>> "PD" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:
    PD> maechler@stat.math.ethz.ch writes:
    >> One easy and "clean" fix is to put the following at the very
    >> beginning of diff.default :
    >> if(is.ts(x)) { require(ts)
    >>                UseMethod("diff") }
    PD> ...
    >> The above passes "make check" (and more).
    >> Anybody against this?

    PD> I'm not really pro or con, but what is wrong with autoloading
    PD> diff.ts??

    MM> it does not work, i.e.

    MM>    autload("diff.ts", "ts") diff(ts(1:10))

    MM> does not load package ts.  It's not so clear if this is a bug in
    MM> method dispatching ...  but assuming ``standard semantic'' (diff.ts
    MM> is in search() i.e. diff() should dispatch to it), it is one..

    MM> Shall I 1) commit my proposed change to "R-release-patches" (since
    MM> it fixes a bug in R 1.1.1) 2) submit a new bug report about the
    MM> non-dispatching to "Autoloads" objects ?

Just a report to the non-core audience and for the bug-archive:

Both of these have been resolved now for "R-devel" [R 1.2 unstable]

 i.  autoload("diff.ts", "ts")  now *does* work (thanks to Thomas Lumley)

 ii. the above autoload is now in the system profile and fixes the diff(.) bug.


r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch