Description Usage Arguments Details Value Note See Also Examples
The function tis is used to create time-indexed series objects.
as.tis and is.tis coerce an object to a time-indexed
series and test whether an object is a time-indexed series.
1 2 3 4 5 6 7 8 9 10 11 |
data |
a numeric vector or matrix of the observed time-series values. |
start |
the time of the first observation. This can be a |
... |
other args to be passed to the method called by the generic
function. |
tif |
a ti Frequency, given as either a numerical code or a string.
|
frequency |
As an alternative to supplying a |
end |
the time of the last observation, specified in the same way as |
x |
object to be tested ( |
The function tis is used to create tis objects, which
are vectors or matrices with class of "tis" and a start
attribute that is a ti (time index) object. Time-indexed
series are a form of time series that is more flexible
than the standard ts time series. While observations for a
ts object are supposed to have been sampled at equispaced
points in time, the observation times for a tis object are the
times given by successive increments of the more flexible time index
contained in the series start attribute. There is a close
correspondence between Fame time series and tis objects, in
that all of the Fame frequencies have corresponding tif codes.
tis objects operate much like vanilla R ts objects.
Most of the methods implemented for ts objects have tis
variants as well. Evaluate methods(class = "tis") to see a
list of them.
One way or another, tis needs to figure out how to create a
start attribute. If start is supplied, the function
ti is called with it, tif and frequency as
arguments. The same process is repeated for end if it was
supplied. If only one of start and end was supplied, the
other is inferred from it and the number of observations in data. If
both start and end are supplied, the function rep
is used to make data the length implied by end - start + 1.
as.tis is a generic function with specialized methods for other
kinds of time series, including zoo series from zoo.
The fallback default method calls tis(x, ...).
tis and as.tis return time-indexed series.
is.tis returns TRUE or FALSE.
If the index of a zoo series is a ti,
the coercion as.tis.zoo does is trivial. For other kinds of
zoo series, the function inferTi tries to figure out a time
index that matches the times of the index of the zoo series.
This may fail, as there are infinitely more possible kinds of zoo
indexes than the finite number of time index frequencies.
Compare with ts. See ti for
details on time indexes. cbind.tis combines several
time indexed series into a multivariate tis, while
mergeSeries merges series, and convert and
aggregate convert series from one frequency to another.
start.tis and end.tis return ti
objects, while ti.tis returns a vector ti. There
is a print method print.tis and several plotting
methods, including lines.tis and points.tis.
The window.tis method is also sufficiently different
from the ts one to deserve its own documentation.
1 2 3 |
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2000 1 2 3 4 5 6 7 8 9 10 11 12
2001 13 14 15 16 17 18 19 20 21 22 23 24
2002 25 26 27 28 29 30 31 32 33 34 35 36
2003 37 38 39 40 41 42 43 44 45 46 47 48
class: tis
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2000 1 2 3 4 5 6 7 8 9 10 11 12
2001 13 14 15 16 17 18 19 20 21 22 23 24
2002 25 26 27 28 29 30 31 32 33 34 35 36
2003 37 38 39 40 41 42 43 44 45 46 47 48
class: tis
20000103 0
20000110 0
20000117 0
20000124 0
20000131 0
20000207 0
20000214 0
20000221 0
20000228 0
20000306 0
20000313 0
20000320 0
20000327 0
20000403 0
20000410 0
20000417 0
20000424 0
20000501 0
20000508 0
20000515 0
20000522 0
20000529 0
20000605 0
20000612 0
20000619 0
20000626 0
20000703 0
20000710 0
20000717 0
20000724 0
20000731 0
20000807 0
20000814 0
20000821 0
20000828 0
20000904 0
20000911 0
20000918 0
20000925 0
20001002 0
20001009 0
20001016 0
20001023 0
20001030 0
20001106 0
20001113 0
20001120 0
20001127 0
20001204 0
20001211 0
20001218 0
20001225 0
class: tis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.