plot.times(x, y, ..., xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), type = "p")
dates
or
times
function to
use as the abscissa of the plot.
ts.plot
function.
Plot.times
makes an irregular time series object out of
x
and
y
and
calls
ts.plot
with that time series. It sorts them so that
x
is
sorted, hence if
x
is not originally sorted type="l" will connect
points in the sorted order, not in the original order.
# The following plots someone's pay vs payday. payday <- dates(c("12/15/93", "12/31/93", "1/15/94", "1/31/94", "2/15/94", "2/28/94"), format = c("m/d/y")) pay <- runif(length(payday), 500, 600) plot(payday, pay, type = "l") # The points are connected by lines and the x axis has tick marks # labeled "12/15/93", "12/29/93", ..., "02/23/94" (every 14 days).