Skip to content
Back to formatted view

Raw Message

Message-ID: <CAP+bYWAp7XNewoEMGU6pf6haTTTyuLdMfkV4SdN6DHTaC41N9g@mail.gmail.com>
Date: 2012-02-11T02:50:53Z
From: Hasan Diwan
Subject: Scriptable Integration
In-Reply-To: <CAAmySGP60OJ=OUHnxCRTOChpo=2tBAtE7Q6ut8SBE=H7Pw5kgw@mail.gmail.com>

Michael,
On 10 February 2012 18:11, R. Michael Weylandt
<michael.weylandt at gmail.com> wrote:
> I'm not quite sure what you mean, but perhaps this will help:
> spf <- splinefun(mydata$V2)
> splInt <- function(low, up) integrate(spf, low, up)$value

Sort of, I'm looking to get the nth order integral, where the only
thing I know about n is that it is greater than 1, but in practise
will be under 4. Something like:
spf <- rep(splinefun(myData$V2, times=(n-1))
splInt <- integrate(spf, min(myData$V2), max(myData$V3))

However, I can't seem to figure out how to get splinefun to evaluate
itself. Hope that's clearer and thanks for the help!
-- 
Sent from my mobile device
Envoyait de mon portable