get_ecb_fx: Get Exchange Rate vs EUR from ECB

Description Usage Arguments Details Value Examples

View source: R/get_ecb_fx.R

Description

This function implements the API to the ECB Statistical Data Warehouse to fetch reference exchange rates vs the Euro.

Usage

1
2
3
4
5
6
7
get_ecb_fx(
  cur,
  start_date = "1999-01-04",
  end_date = Sys.Date(),
  freq = "D",
  type = "A"
)

Arguments

cur

Currency - three letter standard

start_date

First day of time series

end_date

Last day of time series

freq

Upper case, single letter abbreviation of annual, daily, half-yearly, monthly or quarterly

type

'A' for average or 'E' for end-of-period

Details

The type "end-of-period" does not exist for frequencies (e. g. half-annually for USD). If this is the case, use "A" for average. The "Datum" column is only of type "date" for daily data, else it is "character".

Value

A tibble with Datum as date index and y.xxx.EUR as values for currency XXX with frequency y

Examples

1
get_ecb_fx("CHF")

ojessen/ecbfx documentation built on July 9, 2020, 12:50 a.m.