getFed | R Documentation |
It downloads financial and economic time series data from the Fed.
getFed(var.name="UNRATE", from="1900-01-01",end=Sys.Date(), do.plot=TRUE)
var.name |
The name of variable as used by <"https://fred.stlouisfed.org">. For example, "UNRATE" denotes unemployment rate, "CPIAUCSL" is monthly consumer price index, "GDP" is Gross domestic product, and "ICSA" is the initial claim seasonally adjusted. User please check with the web for symbol. |
from |
The starting date, the default is 1900-01-01 to ensure the very beginning. |
end |
The ending date of data retrieved, the default is Sys.Date(). |
do.plot |
Whether to plot the retrieved data, the default is TRUE. Please set this value to be FALSE to avoid too many plotting, if you want to loop more downloads. It applies functionseriesPlot() from package fBasics. |
This function connects with <"https://fred.stlouisfed.org"> and downloads the specified market data. The rownames of downloaded data is embedded by the timestamp already.
data |
The data retrieved. |
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
getFed(var.name="UNRATE")$data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.