xy.coords is used by many functions to obtain
x and y coordinates for plotting. The use of this common mechanism
across all relevant R functions produces a measure of consistency.
the x and y coordinates of a set of points.
Alternatively, a single argument
names for the x and y variables to be extracted.
An attempt is made to interpret the arguments
a way suitable for bivariate plotting (or other bivariate procedures).
x is a
of the form
yvar ~ xvar.
yvar are used as x and y variables.
y, these are
used to define plotting coordinates.
the x values are taken to be
time(x) and the y values to be the time series.
data.framewith two or more columns:
the first is assumed to contain the x values and the
second the y values. Note that is also true if
has columns named
"y"; these names will be
In any other case, the
x argument is coerced to a vector and
returned as y component where the resulting
x is just
the index vector
1:n. In this case, the resulting
component is set to
x (after transformation as above) inherits from class
"POSIXt" it is coerced to class
A list with the components
numeric vector of the same length as
lowess are examples of functions which use this mechanism.
1 2 3 4 5 6 7