0

I need to calculate the Area under the curve where a global maxima has been observed. As shown in below image, i first need to find the global maxima and then estimate the area under that curve (where global maxima was observed. Below is the sample data.

Sample DF:

Df <- c(1, 2, 1, 1.3, 1.2, 1, 2, 1, 21, 23, 24, 25, 24, 23, 26, 23, 17, 11, 2, 1, 1, 2, 2 , 7, 9, 2,)

Sorry, I couldn't get any ideas with the code because in reality the data I have has lot of local maxima/minima (noise). All I am interested is to find that global maxima & estimate the area under curve.

Expected Output:

Global Maxima: Area Under that Curve:

sample image

Coolsun
  • 189
  • 9
  • Take a look at this and see if it can help: https://stackoverflow.com/questions/6836409/finding-local-maxima-and-minima – NelsonGon Jan 28 '19 at 13:52
  • Just a quick clarification: your object Df ends with a: `,)` which returns error. – Leevo Jan 28 '19 at 15:22

0 Answers0