getDataSeries: Downloading data series

Description Usage Arguments Value Examples

Description

Downloads one or more data series from the CBRT datasets.

Usage

1
2
getDataSeries(series, CBRTKey = myCBRTKey, freq, aggType,
  startDate = "01-01-1950", endDate, na.rm = T)

Arguments

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:

1

Day

2

Work day

3

Week

4

Biweekly

5

Month

6

Quarter

7

Six months

8

Year

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:

avg

Average value

first

First observation

last

Last observation

max

Maximum value

min

Minimum value

sum

Sum

startDate

The beginning date for data series (DD-MM-YYYY).

endDate

The ending date for data series (DD-MM-YYYY).

na.rm

Logical variable to drop all missing dates.

Value

a data.table object

Examples

1
2
3
4
5
6
## 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)

etaymaz/CBRT documentation built on May 24, 2019, 8:51 a.m.