title: How to find x intercept for intersection of two curves in R?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>df1=read.csv("file1.csv")
  df2=read.csv("file2.csv") 
  ggplot(df1, aes(x,y))+geom_line()+geom_line(aes(df2$x, df2$y))
  df2$x[abs(df2$y-df2$x)&lt;0.001 &amp; df2$x&gt;5 &amp; df2$x&lt;7)]</code></pre>
  </div>
  </div>
  </p>
  <p>I had csv data which I imported to R environment as a dataframe. Then I I overlay the two dataframes on a plot using ggplot. I need to find the points where intersection of the curves will be located between x=5 and x=7.5. Can you help?
  The last line of code I used as shown in the code snippet didn't show me any value but I can see the intersection in the plot.
  <img src="https://i.stack.imgur.com/QV14F.png" alt="the 2 plots overlaid using ggplot " /></p>