TITLE(ts @@ Time-Series Objects)
USAGE(
ts(x, start=1, end, frequency=1, deltat=1, ts.eps = .Options$ts.eps)
as.ts(x)
is.ts(x)
BLANK
print(ts.obj, calendar, ...)
plot(ts.obj, ...)
)
ALIAS(ts)
ALIAS(as.ts)
ALIAS(is.ts)
ALIAS(print.ts)
ALIAS(plot.ts)
ARGUMENTS(
ARG(x @@ a vector or matrix the observed time-series values.)
ARG(start @@ the time of the first observation.)
ARG(end @@ the time of the last observation.)
ARG(frequency @@ the number of observations per unit of time.)
ARG(deltat @@ the fraction of the sampling period between successive
observations; e.g. 1/12 for monthly data.
Only one of LANG(frequency) or LANG(deltat) should be provided.)
ARG(ts.eps @@  time series comparison tolerance.  Frequencies are considered
equal if their absolute difference is less than LANG(ts.eps).)
)
DESCRIPTION(
The function LANG(ts) is used to create time-series objects.
These are vector or matrices with class of LANG("ts")
(and additional attributes) which represent data which
has been sampled at equispaced points in time.
In the matrix case, each column of the matrix LANG(x)
is assumed to contain a single (univariate) time series.
PARA
The value of argument LANG(frequency) is used when the series
is sampled an interal number of times in each unit time interval.
For example, one could use a value of LANG(7) for LANG(frequency) when
the data are sampled daily, and the natural time period is a week,
or LANG(12) when the data are sampled monthly
and the natural time period is a year.
PARA
LANG(start) and LANG(end) can either be integers which correspond
to natural time units, or vectors of two integers, which give
a natural time unit and a (1-based) number of samples into
the time unit.
PARA
LANG(as.ts) and LANG(is.ts) respectively coerce a vecor
into a time-series and test whether an object is a time series.
PARA
Time series have methods associated with the generic
LANG(print) and LANG(plot) functions.
The argument LANG(calendar) to the print method
can be used to enable/disable the display of information
about month-names, quarter-names or year when printing.
)
SEEALSO(
LANG(LINK(frequency)),
LANG(LINK(start)),
LANG(LINK(end)),
LANG(LINK(time)),
LANG(LINK(window)).
)
EXAMPLES(
ts(1:10, frequency = 4, start=c(1959,2))#- 2nd Quarter of 1959
print(ts(1:10, freq=7, start=c(12,2)), calendar = T)
# start date = July 1954:
gnp <- ts(cumsum(1+round(rnorm(100), 2)), start=c(1954,7), frequency=12)
plot(gnp)#-> using 'plot.ts' for time-series plot
)
