Create a time-series table (ts_table). A
ts_table is a numeric matrix, so there is
always a dim attribute. For a ts_table
x, you get the number of observations with
dim(x)[1L].
Attached to this matrix are several attributes:
- timestamp
a vector: the numeric representation of
the timestamp
- t.type
character: the class of the original
timestamp, either Date or POSIXct
- columns
a character vector that provides the
columns names
There may be other attributes as well, but these three
are always present.
Timestamps must be of class Date or
POSIXct (POSIXlt is
converted). A tzone attribute is dropped.
A ts_table is not meant as a time-series
class. For most computations (plotting, calculation
of statistics, etc.), the ts_table must first
be coerced to zoo, xts, a
data.frame or a similar data
structure. Methods that perform such coercions are
responsible for converting the numeric timestamp
vector to an actual timestamp. For this, they may use
the function ttime (‘translate time’).