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

Peter Ehlers ehlers at ucalgary.ca
Sat Sep 1 01:10:41 CEST 2012


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 <comtech.usa at gmail.com> 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.
>>
>> Instead, I would like to get the index of these select points...
>>
>> The axis values are real-values so it's a bit hard for me to directly
>> reverse-engineer the index nubmers..
>>
>> How to do that?
>>
>> Thank you!
>>
>>          [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>




More information about the R-help mailing list