indexplot | R Documentation |
Index plots with point identification.
indexplot(x, groups, labels = seq_along(x), id.method = "y", type = "h",
id.n = 0, ylab, legend="topright", title, col=palette(), ...)
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 |
Returns labelled indices of identified points or (invisibly) NULL
if no points
are identified or if there are multiple variables with some missing data.
John Fox jfox@mcmaster.ca
showLabels
, plot.default
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.