getDataSeries | R Documentation |
Downloads one or more data series from the CBRT datasets.
getDataSeries(
series,
CBRTKey = myCBRTKey,
freq,
aggType,
startDate = "01-01-1950",
endDate,
na.rm = TRUE
)
series |
A vector of data series' codes. |
CBRTKey |
Your personal CBRT access key. |
freq |
Numeric, the frequency of the data series. If not defined, the default (the highest possible frequency) will be used. The frequencies are as follows:
|
aggType |
Aggregation of data series. This paremeter defines the method to be used to aggregate data series from high frequency to low frequency (for example, weekly data to monthly data). The following methods are available:
If a frequency level lower than the default is used, the data will be aggregated by using the default method for that data group (for example, if monthly data are download for weekly series). |
startDate |
The beginning date for data series (DD-MM-YYYY). |
endDate |
The ending date for data series (DD-MM-YYYY). If not defined, the default (the latest available) will be used. |
na.rm |
Logical variable to drop all missing dates. |
a data.table object
## Not run:
mySeries <- getDataSeries("TP.D1TOP")
mySeries <- getDataSeries(c("TP.D1TOP", "TP.D2HAZ", "TP.D4TCMB"))
mySeries <- getDataSeries(c("TP.D1TOP", "TP.D2HAZ", "TP.D4TCMB", startDate="01-01-2010"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.