jubilee.read_fred_file {jubilee} | R Documentation |
Internal utility to read FRED file
Description
This utility reads the internal static file, optionally amends with FRED online data, and returns the values of a given symbol.
Usage
jubilee.read_fred_file(fraction, local_file, symbol, online = FALSE,
daily_symbol = NULL, period = "M")
Arguments
fraction |
numeric, the fraction to return the value.
The utility will lookup within a month to find value.
For debug purpose, set it to |
local_file |
character, the file name of an internal file.
For debug purpose, set it to |
symbol |
character, the FRED symbol. |
online |
logical, whether to fetch online data from FRED. Default is |
daily_symbol |
character, the FRED symbol to read daily data that supplements
the monthly data. Default is |
period |
charater, length-1 string indicating the data period of the symbol.
M is monthly, Q is quarterly. Default is |
Value
The values of the symbol, numeric with the same length as fraction
.
Author(s)
Stephen H. Lihn
Examples
## Not run:
repo <- jubilee.repo(online=FALSE)
a <- jubilee.read_fred_file(repo@ie$fraction, "BAA.csv", "BAA")
tail(a)
## End(Not run)