
Functions for extracting time frame information.
# S3 method for tframed
start(x, ...)
# S3 method for tframe
start(x, ...)
tfstart(x)
# S3 method for default
tfstart(x)
# S3 method for tstframe
tfstart(x) # S3 method for tframed
end(x, ...)
# S3 method for tframe
end(x, ...)
# S3 method for tstframe
tfend(x)
tfend(x)
# S3 method for default
tfend(x)
# S3 method for tframed
frequency(x, ...)
# S3 method for tframe
frequency(x, ...)
tffrequency(x)
# S3 method for default
tffrequency(x)
Tobs(x)
# S3 method for default
Tobs(x)
# S3 method for tframed
Tobs(x)
# S3 method for tframe
Tobs(x)
# S3 method for stamped
Tobs(x)
# S3 method for tframed
time(x, ...)
# S3 method for tframe
time(x, ...)
tftime(x)
# S3 method for default
tftime(x)
# S3 method for tframed
time(x, ...)
a tframe or a tframed object.
arguments to be passed to other methods.
Depends
The methods start and end return the start or end date of a tframe or tframed object. Periods return the number of observations (time points). frequency returns the frequency of observation, typically the number of observations in a year for economic data, but possibly something else in other contexts. The concept of frequency is not very consistently defined for time series data, and the use of the frequency method should probably be avoided where possible. In practice it seems rarely necessary, but the method makes porting of older code much easier.
# NOT RUN {
z <- ts(rnorm(100), start=c(1982,1), frequency=12)
tfstart(z)
z <- tframed(matrix(rnorm(200), 100,2),
tf=list(start=c(1982,1), frequency=12))
tfend(z)
Tobs(z)
time(z)
# }
Run the code above in your browser using DataLab