Re: [R] how to find the index of points selected from a scatter plot?

2012-09-03 Thread Bert Gunter
All good points. -- Bert On Mon, Sep 3, 2012 at 12:07 PM, Greg Snow <538...@gmail.com> wrote: > I would be very surprised if the x value from locator matched the x > value in the data to the precision needed by ==, and what if 2 points > have the same x-value but different y-values, you would ne

Re: [R] how to find the index of points selected from a scatter plot?

2012-09-03 Thread Greg Snow
I would be very surprised if the x value from locator matched the x value in the data to the precision needed by ==, and what if 2 points have the same x-value but different y-values, you would need to also check the y's. With appropriate rounding this would work, but would just be reinventing the

Re: [R] how to find the index of points selected from a scatter plot?

2012-08-31 Thread Peter Ehlers
On 2012-08-31 16:03, Bert Gunter wrote: ?which ## as in ix <- which(x==values) -- Bert Or maybe ?identify. Peter Ehlers On Fri, Aug 31, 2012 at 2:09 PM, Michael wrote: Hi all, I am using "locator" to select the points from a scatter plot... This is all fine. But the problem is that t

Re: [R] how to find the index of points selected from a scatter plot?

2012-08-31 Thread Bert Gunter
?which ## as in ix <- which(x==values) -- Bert On Fri, Aug 31, 2012 at 2:09 PM, Michael wrote: > Hi all, > > I am using "locator" to select the points from a scatter plot... > > This is all fine. > > But the problem is that the locator only returns the axis values of the > selected points. > >

[R] how to find the index of points selected from a scatter plot?

2012-08-31 Thread Michael
Hi all, I am using "locator" to select the points from a scatter plot... This is all fine. But the problem is that the locator only returns the axis values of the selected points. Instead, I would like to get the index of these select points... The axis values are real-values so it's a bit har