
CHAPTER 3
Comparisons
We begin with the construction of a small gadget that will provide us with example data. The
base is a reaction tester. We present a “random” point, wait for a mouse click on that point and
record the position of the mouse pointer. To get a stable image for repeated activations, we fix
the coordinate system.
Example 3.1: Interactive Location
Input
plot(x = runif(1), y = runif(1),
xlim = c(0, 1), ylim = c(0, 1),
main = "Please click on the circle",
xlab = '', ylab = '',
axes = FALSE, frame.plot = TRUE)
xclick <- locator(1)
Please click on the circle
Now we wrap up the base function in a timer. We record the coordinates, try to measure