TITLE(time @@ Sampling Times of Time-Series)
USAGE(
time(x, offset=0)
start(x)
end(x)
frequency(x)
tsp(x)
)
ALIAS(time)
ALIAS(start)
ALIAS(end)
ALIAS(frequency)
ALIAS(tsp)
ARGUMENTS(
ARG(x @@ a time-series.)
)
DESCRIPTION(
LANG(time) creates the vector of times at which a
time series was sampled.
LANG(offset) can be used to indicate when sampling took place
in the time unit.
LANG(0) indicates the start of the unit, LANG(0.5) the middle and
LANG(1) the end of the interval.
PARA
LANG(start) and LANG(end) extract
the times the first and last observations were taken
and LANG(frequency) returns the number of samples per unit time.
PARA
LANG(tsp(x)) returns the vector LANG(c(start(x),end(x),frequency(x))).
It is included for compatibility with the S language.
)
SEEALSO(
LANG(LINK(ts)).
)
EXAMPLES(
data(presidents)
# a simple series plot
plot(c(time(presidents)), c(presidents), type="l")
)
