Re: [R] Calculate the area under a curve

2015-08-24 Thread PIKAL Petr
er and margin. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of > CarstenH > Sent: Monday, August 24, 2015 11:10 AM > To: r-help@r-project.org > Subject: [R] Calculate the area under a curve > > Hi all > > I ne

Re: [R] Calculate the area under a curve

2015-08-24 Thread Greg Snow
An alternative to your approach is to pass your data to the approxfun or splinefun functions and then use the integrate function on the result. On Mon, Aug 24, 2015 at 3:10 AM, CarstenH wrote: > Hi all > > I need to calculate the area under a curve (integral) for the following data > pairs: > > D

Re: [R] Calculate the area under a curve

2015-08-24 Thread William Dunlap
This is partly a bug in the AUC package and partly a problem with you not reading or understanding the the help file for the auc function in that package. help(auc) says auc(x, min = 0, max = 1) Arguments: x: an object produced by one of the functions ‘sensitivity’,

Re: [R] Calculate the area under a curve

2015-08-24 Thread CarstenH
Hi Charles I am new in R and would like to learn/use it in the beginning for easy operations. I already used google for houres and did not find a solution for this in my eyes easy calculation process. I spent long time with reading forums, package handbooks, and tried and error but always failed.

Re: [R] Calculate the area under a curve

2015-08-24 Thread David Winsemius
On Aug 24, 2015, at 7:23 AM, Jeff Newmiller wrote: > Read ?predict, paying particular attention to the newdata argument. I agree that reading help pages is needed but need both the ?predict page and the ?integrate page. I think proximate cause of the error is that `integrate` is not getting an

Re: [R] Calculate the area under a curve

2015-08-24 Thread Jeff Newmiller
Read ?predict, paying particular attention to the newdata argument. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Calculate the area under a curve

2015-08-24 Thread Charles Determan
Hi Carsten, This list is meant to help you solve specific coding problems. What have you tried? A quick google search will provide several packages including caTools, ROCR, AUC, pROC. Look in to some of them, try them out and report back if you have problems 'using' a function instead of just a

[R] Calculate the area under a curve

2015-08-24 Thread CarstenH
Hi all I need to calculate the area under a curve (integral) for the following data pairs: Depth SOC 22.50.143 28.50.165 34.50.131 37.50.134 40.50.138 43.50.107 46.50.132 49.50.175 52.50.087 55.50.117 58.50.126 61.50.