Seth Roberts wrote:
> How can I use R to record the time of a mouse click?

Assuming they are mouse clicks on a plot from locator() or identify() 
then its as trivial as this:

 > plot(1:10)
 > locator(1); when=date(); print(when)
$x
[1] 3.787584

$y
[1] 1.978947

[1] "Mon Mar 12 09:34:07 2007"

  but that only gets you one second resolution, and assumes zero delay 
between the click and the when=date() function call.

Good enough?

Barry

______________________________________________
R-help@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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to