Learn R Programming

tframe (version 2015.12-1.1)

tfstart: Extract Time Frame Information

Description

Functions for extracting time frame information.

Usage

# 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, ...)

Arguments

x

a tframe or a tframed object.

...

arguments to be passed to other methods.

Value

Depends

Details

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.

See Also

tframe, tframed start end frequency Tobs time lag diff

Examples

Run this code
# 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