GetQuandlData (version 0.1.0)

get_single_Quandl: Fetches a single time series from Quandl

Description

Fetches a single time series from Quandl

Usage

get_single_Quandl(id_in, name_in, api_key, first_date, last_date,
  do_cache = TRUE, order = "asc", collapse = "none",
  transform = "none")

Value

A single dataframe

Arguments

id_in

Character vector of ids to grab data. When using a named vector, the name is used to register the time series. Example: id_in <- c('US GDP' = 'FRED/GDP')

name_in

Name of series to fetch

api_key

YOUR api key (get your own at <https://www.quandl.com/sign-up-modal?defaultModal=showSignUp>)

first_date

First date of all requested series as YYYY-MM-DD (default = Sys.date() - 365)

last_date

Last date of all requested series as YYYY-MM-DD (default = Sys.date() - 365)

do_cache

Do cache? TRUE (default) or FALSE. Sets the use of package memoise to cache results from the api

order

How to order the time series data: 'desc' (descending dates, default) or 'asc' (ascending)

collapse

Frequency of time series: 'none' (default), 'daily', 'weekly', 'monthly', 'quarterly', 'annual'

transform

Quandl transformation: 'none', 'diff', 'rdiff', 'rdiff_from', 'cumul', 'normalize'. Details at <https://docs.quandl.com/docs/parameters-2>

Examples

Run this code

api_key <- 'YOUR_API_KEY_HERE'
id_in <- c('Inflation argentina' = 'RATEINF/INFLATION_ARG')
if (FALSE) {
 df <- get_single_Quandl(id_in = id_in, name_in = '',
                         api_key = api_key,
                         first_date = '2010-01-01',
                         last_date = Sys.Date())
 }

Run the code above in your browser using DataCamp Workspace