I have a data frame with two columns:
dd <- read.table(text = "
344 0
350 16
366 11
376 8
380 28
397 55
398 45
400 19
402 30
408 20
415 0
")
I want to subset the data between the two minimum local around the highest value in the second column (55
).
The result will be:
376 8
380 28
397 55
398 45
400 19
It must contain a minimum local function because the dimension of sub-data frame is variable
dd <- read.table(text = "
460 0
461 2
463 16
469 33
471 13
473 23
479 38
480 168
481 0")