[R] Area Under a Curve

From: stephen sefick <ssefick_at_gmail.com>
Date: Tue, 01 Jul 2008 18:38:27 -0400


I would like to integrate the area under a curve without any smoothing or the like- just on the raw numbers. I looked at integrate() but it requires a function which I assume means something like x+x^2+x^3

is there a built in function in R for this?

#let's say
x <- seq(1:50)
y <- seq(1:50)
plot(y~x)
# the are would be 1250
# I would like to be able to do this but on more complicated numeric sets of
points say dissolved oxygen mass

thanks

stephenr

-- 
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.
Received on Tue 01 Jul 2008 - 22:41:06 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