Give some data points plotted like this (below), how would I go about getting the intersecting values which intersect at a specific y. For example, if I were to draw the horizontal line y=1000, which x values on the plot would it intersect with (as an array)?
My data looks like this
x <- c(1, 2, 3, 4, ..., )
y <- c(1000, 1200, 900, 700, ..., )

Thank you.
Finding threshold crossings without smoothing rarely gives well-defined values. Play with the following:
If you want to get “exact” threshold crossings (what is exact if smoothing is so important?) you should use the above approximation first to get a region around the crossing and do a quadratic or linear interpolation afterwards, e.g. with 5 points.