This help topic is for R version 0.90. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/locator.html
locator {base}R Documentation

Graphical Input

Description

locator reads the position of the graphics cursor when the (first) mouse button is pressed. Unless the process is terminated prematurely by the user (see below) at most n positions are determined.

The input process can be terminated prematurely by pressing any mouse button other than the first.

Usage

locator(n=512, type="n")

Arguments

n

the maximum number of points to locate.

type

One of "n", "p", "l" or "o". If "p" or "o" the points are plotted; if "l" or "o" they are joined by lines.

Details

The current graphics parameters apply just as if plot.default has been called with the same value of type. The plotting of the points and lines is subject to clipping, but locations outside the current clipping rectangle will be returned.

Value

A list containing x and y components which are the coordinates of the identified points.


[Package base version 0.90 ]