plotclean: Plot multiple growth curves to identify outliers

View source: R/plotclean.R

plotcleanR Documentation

Plot multiple growth curves to identify outliers

Description

A version of mplot to plot growth curves and identify outliers. When outliers are clicked on, and if id is specified, the corresponding growth curve is highlighted. If id is not specified the selected point is highlighted. Use right-click to exit.

Usage

plotclean(
  x,
  y,
  id = NULL,
  data = parent.frame(),
  n = length(x),
  par.out = list(pch = 20),
  ...
)

Arguments

x

vector of x coordinates.

y

vector of y coordinates.

id

factor of subject levels indexing each growth curve.

data

optional dataframe containing x, y and id.

n

maximum number of points to be identified.

par.out

list of optional graphical parameters to control appearance of selected outlying points and lines.

...

Further graphical parameters (see par) may also be supplied as arguments for lines and points, particularly line type, lty, line width, lwd and color, col.

Value

plotclean returns either a vector rows (if data is not specified) or a list:

rows

a vector of row numbers corresponding to the selected points.

data

a subset of data consisting of rows rows, and columns id, x and y.

Author(s)

Tim Cole tim.cole@ucl.ac.uk

Examples


if (interactive()) plotclean(age, height, id, heights)


statist7/sitar documentation built on Feb. 7, 2024, 2:08 a.m.