Re: [R] Fitting a curve to data

From: Carl Witthoft <>
Date: Tue, 01 Jul 2008 17:22:32 -0400

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. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 01 Jul 2008 - 21:26:57 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 Tue 01 Jul 2008 - 23:31:30 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive