Re: [R] Fitting a curve to data

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Tue, 01 Jul 2008 18:38:10 -0400

There is an integrate.xy in sfsmic. Limitations discussed there.

On Tue, Jul 1, 2008 at 6:27 PM, stephen sefick <ssefick_at_gmail.com> wrote:
> I would like to know the answer to this question now that I know what we are
> getting at. integrate() looks like it is the right thing, but it has to use
> a function- I would like to know how to just integrate the area under a
> curve with just an input of x and y coordinates.
>
> Stephen
>
> On Tue, Jul 1, 2008 at 5:22 PM, Carl Witthoft <carl_at_witthoft.com> wrote:
>
>> I think the previous answer (to use lm() ) is not necessarily the best
>> option.
>>
>> Since what you want is the definite integral (area under the curve), you
>> can just use one of the existing definite integration tools (sorry, I don't
>> recall the names because I don't use them).
>>
>> If you want to get a "smoothed" curve to remove errors in your data points,
>> I'd recommend fitting a spline and integrating under that.
>>
>>
>> ______________________________________________
>> R-help_at_r-project.org mailing list
>> 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.
>>
>
>
>
> --
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods. We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> 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.
>



R-help_at_r-project.org mailing list
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. Received on Tue 01 Jul 2008 - 22:56:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 08:32:00 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive