I can't get identify to work, using R 2.0.1 under windows xp pro, service pack 2. Here's what I enter, and the result: > plot((our.frame2$c1),(our.frame2$c9)) # Produces desired plot > identify(our.frame2$c1) # Plot comes to forefront, so I select a point warning: no point with 0.25 inches numeric(0) Is my call to identify correct? The help page for indentify (from ?identify) doesn't give any examples, so I don't know what the "x" should be. I right click right on top of one of the points, then left click and select stop. Thanks for any help. Dave Parkhurst
[This email is either empty or too large to be displayed at this time]
Does this work for you? x <- runif(30) y <- runif(30) z <- 1:30 plot(x,y) identify(x,y,z) That is you need to tell it everything it is looking for. Sometimes x is boy x and y because they use xy.coords Tom David Parkhurst wrote:> I can't get identify to work, using R 2.0.1 under windows xp pro, > service pack 2. Here's what I enter, and the result: > > > plot((our.frame2$c1),(our.frame2$c9)) # Produces desired plot > > identify(our.frame2$c1) # Plot comes to forefront, so I select a point > warning: no point with 0.25 inches > numeric(0) > > Is my call to identify correct? The help page for indentify (from > ?identify) doesn't give any examples, so I don't know what the "x" > should be. I right click right on top of one of the points, then left > click and select stop. > > Thanks for any help. > > Dave Parkhurst > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >
David Parkhurst wrote:> I can't get identify to work, using R 2.0.1 under windows xp pro, > service pack 2. Here's what I enter, and the result: > > > plot((our.frame2$c1),(our.frame2$c9)) # Produces desired plot > > identify(our.frame2$c1) # Plot comes to forefront, so I select a point > warning: no point with 0.25 inches > numeric(0) > > Is my call to identify correct? The help page for indentify (from > ?identify) doesn't give any examples, so I don't know what the "x" > should be. I right click right on top of one of the points, then left > click and select stop. > > Thanks for any help. > > Dave ParkhurstYou forgot to pass in your y coordinates in your call to identify(). You can only leave off the y argument in certain circumstances (see ?identify) Here's an example: xdat <- rnorm(10) ydat <- rnorm(10) plot(xdat, ydat) identify(xdat, ydat) So you need: plot(our.frame2$c1, our.frame2$c9) # you don't need the extra brackets identify(our.frame2$c1, our.frame2$c9) G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpsonATNOSPAMucl.ac.uk UCL Department of Geography [W] http://www.ucl.ac.uk/~ucfagls/cv/ 26 Bedford Way [W] http://www.ucl.ac.uk/~ucfagls/ London. WC1H 0AP. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
On Sun, 23 Jan 2005 18:35:00 -0500, David Parkhurst <parkhurs at ariel.ucs.indiana.edu> wrote :>I can't get identify to work, using R 2.0.1 under windows xp pro, >service pack 2. Here's what I enter, and the result: > > > plot((our.frame2$c1),(our.frame2$c9)) # Produces desired plot > > identify(our.frame2$c1) # Plot comes to forefront, so I select a point >warning: no point with 0.25 inches >numeric(0) > >Is my call to identify correct? The help page for indentify (from >?identify) doesn't give any examples, so I don't know what the "x" >should be. I right click right on top of one of the points, then left >click and select stop.You want to give both x and y coordinates to identify(), matching the points you plotted, e.g.. change your example to plot((our.frame2$c1),(our.frame2$c9)) # Produces desired plot identify(our.frame2$c1, our.frame2$c9) # Give the same coords Duncan Murdoch
I asked why my call to identify wasn?t working. Thanks to Petr Pikal, Tom Mulholland, Gavin Simpson, and Duncan Murdoch for explaining that I had misinterpreted the ?identify help page, and that I needed to feed both the x and y vectors in the plot to identify(). It?s working fine for me now. Dave Parkhurst