Learn R Programming

tframe (version R2000.6-1)

end: Generic Time Series Parameters

Description

Functions for extracting time information from tframes or tframed objects.

Usage

start(x)
	end(x)
	periods(x)
	frequency(x)

Arguments

x
A tframe or a tframed object.

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

Examples

Run this code
z <- ts(rnorm(100), start=c(1982,1), frequency=12)
	start(z)
	end(z)
	periods(z)

Run the code above in your browser using DataLab