To extend on Walmes locator, there is a great article (by Timothée) on how
to extract data points from an image using R:
http://www.r-bloggers.com/getting-data-from-an-image-introductory-post/
Contact
Details:---
Contact me:
Hi,
I seem to recall coming across a function that allowed one to mouse-click on an
xy-plot and obtain x and y coordinates. Can anyone remind me its name?
Thanks,
Nuno
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Are you thinking of ?identify ?
Nuno Prista wrote:
Hi,
I seem to recall coming across a function that allowed one to mouse-click on an
xy-plot and obtain x and y coordinates. Can anyone remind me its name?
Thanks,
Nuno
__
R-help@r-project.org
You can use identify() to obtain coordinates from plotted points but if you
want any coordinates you could use locator():
plot(1:10)
loc - locator(n=3)
str(loc)
List of 2
$ x: num [1:3] 2.3 5.4 8.29
$ y: num [1:3] 6.15 8.33 2.6
points(loc$x, loc$y, col=2)
Walmes.
-
..ooo0
4 matches
Mail list logo