plot.formula {base} | R Documentation |
Formula Notation for Scatterplots
Usage
plot.formula(formula, data = NULL, subset, na.action, ..., ask = TRUE)
plot(y ~ x, ...)
Arguments
formula |
a |
data |
a data.frame (or list) from which the variables in
|
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen
when the data contain |
... |
graphical parameters may also be passed as arguments, see
|
ask |
logical, see |
Value
This function is invoked for its side effect of drawing a scatter plot in the active graphics window.
See Also
plot.default
, plot.factor
.
Examples
data(swiss)
op <- par(mfrow=c(2,1))
plot(Fertility ~ Education, data = swiss)
plot(Fertility ~ Education, data = swiss, subset = Education < 20)
par(op)