I have single observations for some and double observations for others. In the case of double observations in x, I want to choose the row with the lower y value to remove that row.
ex <- data.frame('x'= c(1:5, 1:3,5:6), 'y'= c(70,73,72,49,60,14,50,46,13,29))