text methods the formula
should be of the form
y ~ x or
y ~ 1 with a left-hand
side and a single term on the right-hand side. The
accepts other forms discussed later in this section.
Both the terms in the formula and the
… arguments are
data enclosed in
data is a list or a data frame. The terms of the formula and
those arguments in
… that are of the same length as
data are subjected to the subsetting specified in
subset. A plot against the running index can be specified as
plot(y ~ 1).
If the formula in the
plot method contains more than one term
on the right-hand side, a series of plots is produced of the response
against each non-response term.
plot method the formula can be of the form
~ z + y + z: the variables specified on the right-hand side are
collected into a data frame, subsetted if specified, and displayed by
Missing values are not considered in these methods, and in particular
cases with missing values are not removed.
y is an object (i.e., has a
plot.formula looks for a plot method for that class first.
Otherwise, the class of
x will determine the type of the plot.
For factors this will be a parallel boxplot, and argument
horizontal = TRUE can be specified (see
Note that some arguments will need to be protected from premature
evaluation by enclosing them in
quote: currently this is
done automatically for
example, it is needed for the
arguments passed to