[R] Area between 2 curves
k.jewell at campden.co.uk
Mon Apr 30 18:17:43 CEST 2012
A quick Google suggests that sintegral is in the Bolstad2 package:
"R. Michael Weylandt" <michael.weylandt at gmail.com> wrote in message
news:CAAmySGOCtNxWNHJDka=68CRiphxNPpWAp6fm7uFkHTx7XSZVTw at mail.gmail.com...
> You can't just decide a command exists and try to use it by your
> arbitrarily chosen name .... did you look at the function integrate()
> which does exist? It uses a smarter algorithm than Simpson's rule.
> Alternatively, Simpson's rule is very easy to code with vectorization
> -- you should be able to implement it yourself in just a few lines
> after reading "An Introduction to R".
> On Mon, Apr 30, 2012 at 6:17 AM, sappy <robert.wittkopf at gmx.de> wrote:
>> i have a question calculating the shaped area between the two curves (see
>> I try to use a Simpson-Integral but it doesn't work. "R" doesn't know the
>> It is possible, that i need a library?
>> Curve 1: y
>> Curve 2: z
>> q<-abs(y-z); est<-sintegral(x,z)
>> View this message in context:
>> Sent from the R help mailing list archive at Nabble.com.
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help