Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

clickbox

Interactively Define a Rectangle


Description

Allows the user to specify a rectangle by point-and-click in the display.

Usage

clickbox(add=TRUE, ...)

Arguments

add

Logical value indicating whether to create a new plot (add=FALSE) or draw over the existing plot (add=TRUE).

...

Graphics arguments passed to polygon to plot the box.

Details

This function allows the user to create a rectangular window by interactively clicking on the screen display.

The user is prompted to point the mouse at any desired locations for two corners of the rectangle, and click the left mouse button to add each point.

The return value is a window (object of class "owin") representing the rectangle.

This function uses the R command locator to input the mouse clicks. It only works on screen devices such as ‘X11’, ‘windows’ and ‘quartz’.

Value

A window (object of class "owin") representing the selected rectangle.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also


spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.