>>>>> "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