Identify3d: Identify points in 3D

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Identify3d.R

Description

The function Identify3d allows you to label points interactively with the mouse: Press the right mouse button (on a two-button mouse) or the centre button (on a three-button mouse), drag a rectangle around the points to be identified, and release the button. Repeat this procedure for each point or set of "nearby" points to be identified.

To exit from point-identification mode, click the right (or centre) button in an empty region of the plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Identify3d(x, ...)

## Default S3 method:
Identify3d(
    x = pars$data[[pars$names['x']]],
    y = pars$data[[pars$names['y']]],
    z = pars$data[[pars$names['z']]],
    labels = rownames(.Plot3d.par$data), groups = NULL,
    col = Plot3d.par()$col, 
    adj = 0, debug = FALSE, pad = 0,
    offset = ((100/length(x))^(1/3)) * 0.02,
    ...
    )

## S3 method for class 'formula'
Identify3d(formula = attr(data, "formula"), data = sys.parent(), labels = NULL, adj = 0, ...)

Arguments

formula

"model" formula, of the form y ~ x + z.

data

data frame, for the formula method.

x

variable for horizontal axis.

y

variable for vertical axis (response).

z

variable for out-of-screen axis.

labels

text labels for the points, one for each point; in the default method defaults to the observation indices, in the formula method to the row names of the data

groups

A factor or variable dividing the observations into groups.

col

colors for the point labels.

adj

label adj value, passed to rgl.texts

debug

if TRUE, print debugging output.

pad

padding between point and label, in number of " " characters.

offset

offset to y value, passed to rgl.texts.

...

Other arguments passed down

Value

Identify3d returns the labels of the identified points

Author(s)

Georges Monette

See Also

Plot3d

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
    head(Smoking)
    rownames(Smoking) = Smoking$Country

    Init3d(family = 'serif', cex = 1.5)
    Plot3d( LE ~ CigCon + HealthExpPC | Continent, Smoking)
    Axes3d()
    Identify3d(pad=1)
 
## End(Not run)

p3d documentation built on May 2, 2019, 5:25 p.m.