lines.tis {tis} | R Documentation |
Plotting Time Indexed Series
Description
Plotting methods for tis
objects
Usage
## S3 method for class 'tis'
lines(x, offset = 0.5, dropNA = FALSE, ...)
## S3 method for class 'tis'
points(x, offset = 0.5, dropNA = FALSE, ...)
Arguments
x |
a |
offset |
a number in the range [0,1] telling where in each period of |
dropNA |
if |
... |
other arguments to be passed on to |
Details
These are fairly simple wrappers around the lines.default
and
points.default
. For example, lines.tis
basically does this:
lines.default(x = time(x, offset = offset), y = x, ...)
and points.tis
is similar. If dropNA
is TRUE
, the
observations in x
that are NA
are dropped from the x and
y vectors sent to the .default functions. For points
, this
shouldn't matter, since points.tis
omits points with NA
values from the plot.
For lines
the dropNA
parameter does make a difference.
The help document for lines
says:
"The coordinates can contain NA
values. If a point contains
NA
in either its x
or y
value, it is omitted from
the plot, and lines are not drawn to or from such points. Thus
missing values can be used to achieve breaks in lines."
Note that if the type
is one of c("p", "b", "o")
, the
non-NA
points are still drawn, but line segments from those
points to adjacent NA
points are not drawn. If dropNA = TRUE
,
the NA
points are dropped before calling lines.default
,
and all of the remaining points will be connected with line segments
(unless suppressed by the type
argument).