Learn R Programming

fame (version 1.13)

setDefaultFrequencies: Return known Time Index Frequencies, Change Default Frequencies

Description

A tif (Time Index Frequency) can usually be set either by code (a number) or by name. setDefaultFrequencies sets particular frequencies for the tif names "weekly", "biweekly", "bimonthly" (also "bimonth"), "quarterly" (also "q"), "annual" (also "a"), and "semiannual" (also "sann").

tifList returns the map of frequency names to frequency codes.

Usage

setDefaultFrequencies(weekly     = "wmonday",
                      biweekly   = "bw2wednesday",
                      bimonthly  = "bimonthdecember",
                      quarterly  = "qdecember",
                      annual     = "anndecember",
                      semiannual = "sanndecember",
                      setup = FALSE)
tifList()

Arguments

weekly
A string giving the name of the particular frequency that frequency "weekly" will correspond to
biweekly
Ditto for "biweekly"
bimonthly
Ditto for "bimonth" and "bimonthly"
quarterly
Ditto for "q" and "quarterly"
annual
Ditto for "a" and "annual"
semiannual
Ditto for "sann" and "semiannual"
setup
If TRUE, set all of the defaults, otherwise set only the defaults for which arguments were given. The default is FALSE, but see the details

Value

  • A copy of the .tifList vector.

Details

The named vector .tifList (returned by the function of the same name) stored in the global enviroment contains the mapping of frequency names to frequency codes. Running this function modifies the tifList vector and stores it back in the global environment. It gets run with setup = TRUE when the fame package is loaded. If you want different defaults, call the function sometime after that.

See Also

tifName