title: How to get coordinates of a selected point in R plot?
body: <p>I need to pass to R program coordinates of a point selected by the mouse pointer, to perform some calculations. I have problems getting it to work.</p>
  
  <p>I know that this code should identify point on a plot:</p>
  
  <pre><code>plot(kk2$k2,kk2$k1)
  identify(kk2$k2,kk2$k1)
  </code></pre>
  
  <p>But even that doesn't work. On a plot appears some meaningless number, while point has two coordinates. why?</p>
  
  <p>How to fix at least that? </p>
  
  <p>My goal is to have the point coordinates returned to R and perform some calculations on them. The dataset kk2 has only two columns - k1 and k2, nothing more.</p>