Re: [R] Calculate area under a curve

2010-07-07 Thread Greg Snow
p-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of suse > Sent: Thursday, July 01, 2010 8:57 AM > To: r-help@r-project.org > Subject: [R] Calculate area under a curve > > > Hi, > > I want to know the area under a curve, which is not given as a

Re: [R] Calculate area under a curve

2010-07-01 Thread stephen sefick
Don't sorry about n it is only necessary for using a and b which are the upper and lower limit of integration and n is the # of sub-intervals. You can ignore all else and use x and y. I will fix the documentation soon. I did a rather bad job on that help document. kindest regards, Stephen Sefic

Re: [R] Calculate area under a curve

2010-07-01 Thread suse
Thank you, seems to be the right thing for me. But what is this "n" for? The number of iteration steps as mentioned on other pages for the simpson rule? "number of divisions" as said on the help page I don't understand. ("a" and "b" can be ignored, if I got it right?!). Thanks again! stephen sef

Re: [R] Calculate area under a curve

2010-07-01 Thread David Winsemius
On Jul 1, 2010, at 10:56 AM, suse wrote: Hi, I want to know the area under a curve, which is not given as a function, but as values in a time series. It is not a smooth curve, but switches often between positive values and zero (the values describe the moisture in the soil over a year

Re: [R] Calculate area under a curve

2010-07-01 Thread stephen sefick
simp() in the StreamMetabolism package may do the trick. I have used this on time series of chemical constituent masses. hth, Stephen Sefick On Thu, Jul 1, 2010 at 9:56 AM, suse wrote: > > Hi, > > I want to know the area under a curve, which is not given as a function, but > as values in a time

[R] Calculate area under a curve

2010-07-01 Thread suse
Hi, I want to know the area under a curve, which is not given as a function, but as values in a time series. It is not a smooth curve, but switches often between positive values and zero (the values describe the moisture in the soil over a year, one entry is one day). I already tried area.betwee