spatstat (version 1.10-3)

clickppp: Interactively Add Points

Description

Allows the user to create a point pattern by point-and-click in the display.

Usage

clickppp(n=NULL, win=square(1), types=NULL, ..., add=FALSE,
main=NULL, hook=NULL)

Arguments

n
Number of points to be added (if this is predetermined).
win
Window in which to create the point pattern. An object of class "owin".
types
Vector of types, when creating a multitype point pattern.
...
Optional extra arguments to be passed to locator to control the display.
add
Logical value indicating whether to create a new plot (add=FALSE) or draw over the existing plot (add=TRUE).
main
Main heading for plot.
hook
For internal use only. Do not use this argument.

Value

  • A point pattern (object of class "ppp") inside the window win.

code

par

sQuote

  • X11
  • windows
  • quartz

Details

This function allows the user to create a point pattern by interactively clicking on the screen display.

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 window win. Note that if any of the clicked locations were actually outside the window win, they will be deleted.

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

See Also

identify.ppp, locator