title: finding point of intersection in R
body: <p>I have 2 vectors:</p>
  
  <pre><code>set.seed(1)
  x1 = rnorm(100,0,1)
  x2 = rnorm(100,1,1)
  </code></pre>
  
  <p>I want to plot these as lines and then find the intersection points of the lines, also if there are multiple points of intersection then I want to locate each of them.</p>
  
  <p><a href="https://i.stack.imgur.com/7WSoS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7WSoS.png" alt="enter image description here"></a></p>
  
  <p>I have come across a similar question,and tried to solve this problem using <code>spatstat</code>, but I was not able to convert my combined data frame containing both vector values to <code>psp object</code>.</p>