At present R has separate functions "spline" and
"splinefun". The first
of these carries out spline interpolation of a data set and returns the
interpolated values; the second returns the interpolating function itself
(approx and approxfun are similar).
I would like to combine these into a single function "spline" with
an (optional) argument which determines which kind of value is returned.
E.g.
spline(x,y) # return interpolated function
spline(x,y,fun=T) # return the interpolating function
I would also like to propose this as a standard for smoothing and
interpolating functions. This has a couple of advantages - fewer
names to remember and, the ability to use the function form in
model fitting code ("predict" for example).
Any objections or comments?
Ross
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I've been trying to get Matt Calder's S compiler to work in R using R COMPILE and R SHLIB so it will be fairly platform-independent. I'm sure someone has claimed in the past that it is possible/easy to dyn.load() two dynamic libraries and have one call functions in the other. I can't get it to work (Red Hat 5.0/R0.61.1ish). It doesn't seem to matter what order I load them in, they can't find each other. Any ideas? Thomas Lumley ------------------------------------------------------+------ Biostatistics : "Never attribute to malice what : Uni of Washington : can be adequately explained by : Box 357232 : incompetence" - Hanlon's Razor : Seattle WA 98195-7232 : : ------------------------------------------------------------ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> Ross Ihaka writes:> At present R has separate functions "spline" and "splinefun". The first > of these carries out spline interpolation of a data set and returns the > interpolated values; the second returns the interpolating function itself > (approx and approxfun are similar).> I would like to combine these into a single function "spline" with > an (optional) argument which determines which kind of value is returned. > E.g.> spline(x,y) # return interpolated function > spline(x,y,fun=T) # return the interpolating function> I would also like to propose this as a standard for smoothing and > interpolating functions. This has a couple of advantages - fewer > names to remember and, the ability to use the function form in > model fitting code ("predict" for example).> Any objections or comments?Perhaps smoothing.or.interpolating.fun(data) should in general return the FUNCTION (more precisely, a function object of an appropriate class), and the values would be obtained via predict()? -k (May not be BBC, though ...) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._