RandomFields (version 2.0.71)

userinput: General input function

Description

The function provides a general functionality to read and reply user input by locator and readline

Usage

userinput(fct, info=NULL, prompt, n,  type="n", pch=par()$pch,
          cex=par()$cex, ...)

Arguments

fct
either locator or readline
info
arbitrary object; tracing information that is useful in case the user likes to edit the stored sequence of inputs
prompt
prompt parameter of readline
n
parameter n of locator
type
parameter type of locator
pch
character type used by locator
cex
character size used by locator
...
additional graphics parameters used by locator

Value

  • If fct="readline" then a character vector of length one is returned.

    If fct="locator" then the function returns a list containing 'x' and 'y' components which are the coordinates of the identified points in the user coordinate system, i.e., the one specified by 'par("usr")'.

Details

The behaviour of userinput depends on the the value of action set by useraction, see there for more information.

See Also

getactions, Locator, Readline, useraction