tfstart: Extract Time Frame Information

Description Usage Arguments Details Value See Also Examples

View source: R/tframe.R

Description

Functions for extracting time frame information.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    ## S3 method for class 'tframed'
start(x, ...)
    ## S3 method for class 'tframe'
start(x, ...)
    tfstart(x)
    ## Default S3 method:
tfstart(x)
    ## S3 method for class 'tstframe'
tfstart(x)

    ## S3 method for class 'tframed'
end(x, ...)
    ## S3 method for class 'tframe'
end(x, ...)
    ## S3 method for class 'tstframe'
tfend(x)
    tfend(x)
    ## Default S3 method:
tfend(x)

    ## S3 method for class 'tframed'
frequency(x, ...)
    ## S3 method for class 'tframe'
frequency(x, ...)
    tffrequency(x)
    ## Default S3 method:
tffrequency(x)

    Tobs(x)
    ## Default S3 method:
Tobs(x)
    ## S3 method for class 'tframed'
Tobs(x)
    ## S3 method for class 'tframe'
Tobs(x)
    ## S3 method for class 'stamped'
Tobs(x)

    ## S3 method for class 'tframed'
time(x, ...)
    ## S3 method for class 'tframe'
time(x, ...)
    tftime(x)
    ## Default S3 method:
tftime(x)
    ## S3 method for class 'tframed'
time(x, ...)

Arguments

x

a tframe or a tframed object.

...

arguments to be passed to other methods.

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.

Value

Depends

See Also

tframe, tframed start end frequency Tobs time lag diff

Examples

1
2
3
4
5
6
7
    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)

tframe documentation built on Sept. 23, 2019, 3:01 a.m.

Related to tfstart in tframe...