Description Usage Arguments Details Value Examples
Truncate a time series object to a time window.
1 2 3 4 5 6 7 8 | tfwindow(x, tf=NULL, start=tfstart(tf), end=tfend(tf), warn=TRUE)
## Default S3 method:
tfwindow(x, tf=NULL, start=tfstart(tf), end=tfend(tf), warn=TRUE)
## S3 method for class 'ts'
tfwindow(x, tf=NULL, start=tfstart(tf), end=tfend(tf), warn=TRUE)
## S3 method for class 'tframe'
tfwindow(x, tf=NULL, start=tfstart(tf), end=tfend(tf), warn=TRUE)
|
x |
A time series object. |
start |
A start date of a format compatible with the time series |
end |
An end date of a format compatible with the time series |
tf |
A tframe or tframed object |
warn |
A logical indicating if warning should be produced |
If start
or end
are omitted and tf
is specified then the
start or end is taken from the tf
object.
For ts class objects this function calls window but makes more effort to
preserve seriesNames
if x
has them.
It also supports the optional argument warn
to suppress
warning messages. Frequently it is convenient to write code which always
truncates to a window without first checking if the data is already within
the window. Since window produces a warning in this situation, the optional
argument is frequently useful when tfwindow is used by other code.
In Splus tfwindow
also corrects for some bugs in older versions
of window
.
The method for windowing a tframe is a utility to be used by other programs and would not typically be called by a user.
A time series object similar to x, but typically spanning a shorter time period.
1 2 3 4 5 |
Qtr1 Qtr2 Qtr3 Qtr4
1982 -1.42199103 -0.62407313 -0.35225768
1983 -0.43670335 1.67514224 -0.59119750 1.31375934
1984 -0.83336298 -0.08260172 -0.44937595 1.18785955
1985 -1.43246395 -1.33687236 -0.51749994 0.60971787
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.