clickppp(n=NULL, win=square(1), types=NULL, ..., add=FALSE, main=NULL, hook=NULL)
"owin"
.
locator
to control the display.
add=FALSE
) or draw over the existing plot (add=TRUE
).
"ppp"
).
First the window win
is plotted on the current screen device.
Then the user is prompted to point the mouse at any desired locations
and click the left mouse button to add each point.
Interactive input stops after n
clicks (if n
was given)
or when the middle mouse button is pressed.
The return value is a point pattern
containing the locations of all the clicked points
inside the original window win
,
provided that all of the clicked locations were
inside this window. Otherwise, the window is expanded to a box
large enough to contain all the points (as well as containing
the original window).
If the argument types
is given, then a multitype point pattern
will be created. The user is
prompted to input the locations of points of type type[i]
,
for each successive index i
. (If the argument n
was
given, there will be n
points of each type.)
The return value is a multitype point pattern.
This function uses the R command locator
to
input the mouse clicks. It only works on screen devices such as
X11, windows and quartz. Arguments that can be
passed to locator
through ...
include
pch
(plotting character), cex
(character expansion
factor) and col
(colour). See locator
and par
.
identify.ppp
,
locator
,
clickpoly
,
clickbox
,
clickdist