title: Can ggplot2 find the intersections - or is there any other neat way?
body: <p>In an experiment, blood pressure is measured at several time points. Blood pressure rises and declines during the experiment. I need to plot the blood pressure reaction (the easy part) and find the time points (x values) where blood pressure has doubled (the tricky part). I was wondering whether this information could be retrieved in the ggplot?</p>
  
  <p>Here is an example:</p>
  
  <pre><code># Generate data
  time &lt;- c(10, 60, 90, 200, 260, 300, 700)
  value &lt;- c(1, 6, 8, 40, 50, 60, 70)
  df &lt;- data.frame(time, value)
  
  # The first value of "value" is the first observation.
  # When the first "value" increased ten times, it is equal to 10
  # Question is at what time point did the value increase ten times according to the graph?
  
  ggplot(data=c, aes(x=time, y=value,)) + 
       geom_line() +
       geom_hline(y=10, colour="red") +
       annotate("text", hjust=0, x=170, y=15, label="I need to find the x value at the intersection")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/iG2o0.jpg" alt="enter image description here"></p>
  
  <p>Any solutions?</p>