its(x, times, units = NULL, names = NULL) is.its(x)
"dates"
giving the
times in ascending order at which successive observations are sampled.
times
.
(Default is
NULL
)
x
if
x
is a matrix, or
a data frame, or the strings
"Series 1"
,
"Series 2"
, ..., etc. if
dimnames(x) = NULL
.
In the case of data frames,
names
overrides existing column names.
its
returns an object of class
"its"
with data values given
by
x
, and observation times given by
times
.
is.its
returns
TRUE
if
x
is of class
"its"
and
FALSE
otherwise.
The times vector is kept as the
tspar
attribute of the series. When the
series is printed, only the first and last times of observation are printed.
whitenoise <- matrix(rnorm(50), ncol = 2) obs.times <- sort(runif(25, 0, 10)) # make up some observation times x <- its(whitenoise, times = obs.times, names = c("error1","error2")) is.its(x) birthdays <- dates(c("01/02/78", "10/21/81", "06/23/86", "01/19/90", "06/29/92")) ages <- c(15, 11, 7, 3, 1) its(ages, times = birthdays)