get_single_Quandl: Fetches a single time series from Quandl

View source: R/get_guandl_series.R

get_single_QuandlR Documentation

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"
)

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>

Value

A single dataframe

Examples


api_key <- 'YOUR_API_KEY_HERE'
id_in <- c('Inflation argentina' = 'RATEINF/INFLATION_ARG')
## Not run: 
 df <- get_single_Quandl(id_in = id_in, name_in = '',
                         api_key = api_key,
                         first_date = '2010-01-01',
                         last_date = Sys.Date())
 
## End(Not run)


GetQuandlData documentation built on Feb. 16, 2023, 5:53 p.m.