RepoTimeInt-class: S4 class 'RepoTimeInt'

RepoTimeInt-classR Documentation

S4 class RepoTimeInt

Description

An S4 class RepoTimeInt of time intervals expressed in the so-called repo notation in this package is provided. The structure of the class comprises two attributes (slots):

(i) attribute Repo, which is a character vector with the time interval expressed in the repo notation (see details);

(ii) attribute lubriInt, which is a list of time intervals of class Interval of the lubridate-package.

Details

The repo notation of time intervals for this package amounts to denoting them by the string PPp...p, where

  • PP is

    PP Periodicity
    QQ,QR Fortnight (Quincena in Spanish)
    MM,MR Month
    BB,BR Bimonth
    TT,TR Term
    SS,SR Semester
    AA,AR Year (A\~no in Spanish)

    R stands for those cases where the data set contains a rotated sample.

  • p...p is

    p...p Values Periodicity
    qmmyyyy q=1,2; mm=01,...,12; yyyy=year Fortnight
    mmyyyy mm=01,...,12; yyyy=year Month
    byyyy b=1,...,6; yyyy=year Bimonth
    tyyyy t=1,...,4; yyyy=year Term
    syyyy s=1,2; yyyy=year Semester
    yyyy yyyy=year Year

The span of years possibly covered by the repo notation has been internally fixed between the years 1 a.d. and 3000 a.d.

Slots

Repo

Character vector with the time intervals expressed in the repo notation.

lubriInt

List of objects of Interval class of the lubridate-package.

See Also

RepoTimeTolubri, lubriToRepoTime

Examples

# Empty object
x <- new(Class = 'RepoTimeInt')
x
str(x)

# Example with one time interval
RepoNot <- 'MM042015'
lubriNot <- RepoTimeTolubri('MM042015')
x <- new(Class = 'RepoTimeInt', Repo = RepoNot, lubriInt = lubriNot)
x
str(x)


david-salgado/RepoTime documentation built on Feb. 2, 2024, 2:07 p.m.