From maechler at stat.math.ethz.ch  Fri Oct 15 19:36:59 2004
From: maechler at stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Fri Oct 15 19:37:04 2004
Subject: [Rd] splinefun bug (PR#7290)
Message-ID: <20041015173659.60BF110E96@slim.kubism.ku.dk>

>>>>> "kjetil" == kjetil halvorsen <kjetil@acelerate.com>
>>>>>     on Fri, 15 Oct 2004 18:49:09 +0200 (CEST) writes:

    kjetil> The following reliably bombs R, or at least rw2000 (windows XP):

    kjetil> test <- splinefun(vector(length=0), vector(length=0))
    kjetil> test(1)

yes, that's a reproducible bug, thank you.

The embarassing thing is that we've fixed this bug already for 
approxfun() -- and some of us know that  spline* and approx*
have originally been very much in parallel...

BTW: No need to give the function a name: S can nicely work with
     anonymous functions. Consequently, you can get the same effect from

    splinefun(vector(length=0), vector(length=0)) (1)

or, even a bit more compactly:

    splinefun(1[0], 1[0]) (1)

Martin Maechler


[Rd] splinefun bug (PR#7290)
maechler@stat.math.ethz.ch