queueSpatstatLocator | R Documentation |
Add the coordinates of a spatial location to a queue.
The queue can be accessed by the spatstatLocator
function
in a non-interactive session.
queueSpatstatLocator(x, y)
x , y |
Numeric values, or vectors of the same length,
containing spatial coordinates. Any data acceptable to
|
The spatstatLocator
function is a replacement
for the locator
function
that can be used to test software which depends on user input.
When queueSpatstatLocator(x,y)
is called, the coordinate
data x,y
are saved in a queue. The first-listed coordinate
pair x[1], y[1]
is at the front of the queue. Subsequently, when
spatstatLocator
is called, the coordinates are
taken from the front of the queue and returned as if they had been
clicked by the user.
This only works in a non-interactive
session, that is, when interactive()
returns FALSE
.
Integer (invisible). The length of the queue, after inclusion of the new points.
.
spatstatLocator
queueSpatstatLocator(0.5, 0.7)
queueSpatstatLocator(c(0.3, 0.4), c(0.2, 0.9))
if(!interactive()) {
spatstatLocator(2)
spatstatLocator(1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.