[R] stats:: spline's method could not be monoH.FC

Mark Leeds m@rk|eed@2 @end|ng |rom gm@||@com
Sun May 3 06:27:35 CEST 2020


Abby: Here is an article on environments/closures which might be useful to
you. I was reviewing environments recently and it
was a clear explanation of how environments/closures work in R. Even though
it's from 2000, I'm pretty certain that everything
said in it still holds.











On Sun, May 3, 2020 at 12:16 AM Abby Spurdle <spurdle.a using gmail.com> wrote:

> > and just today a colleague asked me about spline interpolation
> > with general 2nd derivative boundary conditions
> >    s''(x_1) = s2_1,  s''(x_n) = s2_2
>
> It should possible via cubic Hermite splines.
> A nontrivial design decision in my package was the computation of
> slopes at the endpoints.
> (Something which I got wrong, twice...)
>
> My guess is that I could write a function in about 60 to 90 minutes,
> including all the testing and calculus.
>
> However, I need to note two things:
> (1) Cubic Hermite splines do not have a continuous second derivative.
> (2) Specifying the second derivatives (at the endpoints) would prevent
> the user from specifying the first derivatives (aka the slopes).
>
> Could you please confirm if the function would still be of interest...?
>
> And completely diverging...
> > it returns a *function* containing its own state
>
> I use function objects extensively.
> However, I haven't been able to find a definitive guide to terminology.
> The word "closure" appears to have a lisp origin, but it usage in R is
> a bit grey.
>
> Many of my functions have attributes.
> However, I recognize that the use the function environments is more
> popular, and has the advantage that the user can take advantage of
> lexical scoping, but has the disadvantage that copying function
> objects can have unexpected results.
>
> Recently, I've been using the terms "Self-Referencing Function
> Objects" and "Functions Bundled with Data", but was wondering if these
> terms are sub-optimal...?
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ih_gent_lexical.pdf
Type: application/pdf
Size: 220482 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200503/fe569c8d/attachment.pdf>


More information about the R-help mailing list