spatstatLocator: Graphical Input

View source: R/locator.R

spatstatLocatorR Documentation

Graphical Input

Description

This is an alternative to the locator function. It contains a workaround for a bug that occurs in RStudio.

Usage

spatstatLocator(n, type = c("p", "l", "o", "n"), ...)

Arguments

n

Optional. Maximum number of points to locate.

type

Character specifying how to plot the locations. If "p" or "o" the points are plotted; if "l" or "o" they are joined by lines.

...

Additional graphics parameters used to plot the locations.

Details

This is a replacement/workaround for the locator function in some versions of RStudio which do not seem to recognise the option type="p".

See locator for a description of the behaviour.

Value

A list containing components x and y which are vectors giving the coordinates of the identified points in the user coordinate system, i.e., the one specified by par("usr").

Software Testing

Programmers may like to know that code which depends on spatstatLocator can be tested in a non-interactive session, if the coordinates are previously queued using queueSpatstatLocator.

Author(s)

\spatstatAuthors

.

See Also

locator.

queueSpatstatLocator

Examples

   if(interactive()) locator(1, type="p")

spatstat.utils documentation built on Oct. 24, 2023, 9:08 a.m.