indexplot {RcmdrMisc} | R Documentation |
Index Plots
Description
Index plots with point identification.
Usage
indexplot(x, groups, labels = seq_along(x), id.method = "y", type = "h",
id.n = 0, ylab, legend="topright", title, col=palette(), ...)
Arguments
x |
a numeric variable, a matrix whose columns are numeric variables, or a numeric data frame;
if |
labels |
point labels; if |
groups |
an optional grouping variable, typically a factor (or character or logical variable). |
id.method |
method for identifying points; see |
type |
to be passed to |
id.n |
number of points to identify; see |
ylab |
label for vertical axis; if missing, will be constructed from |
legend |
keyword (see |
title |
title for the legend; may normally be omitted. |
col |
vector of colors for the |
... |
to be passed to |
Value
Returns labelled indices of identified points or (invisibly) NULL
if no points
are identified or if there are multiple variables with some missing data.
Author(s)
John Fox jfox@mcmaster.ca
See Also
Examples
if (require("car")){
with(Prestige, indexplot(income, id.n=2, labels=rownames(Prestige)))
indexplot(Prestige[, c("income", "education", "prestige")],
groups = Prestige$type, id.n=2)
}