I have many pairs of (x, y) data, it plotted like a curve with 3 summits. How can I know the x value of each y-value summits?
Use the sin function as an example.
X = seq(0,30,0.1)
Y = sin(X)
# I actually only have numbers of X and Y. I don't know the relation/function of X and Y.
plot(X, Y)