View source: R/boe_exchange_rate.R
| boe_exchange_rate | R Documentation |
Downloads daily spot exchange rates for sterling against major currencies from the Bank of England. Most series available from January 1975.
boe_exchange_rate(
currency = "USD",
from = "1975-01-02",
to = Sys.Date(),
cache = TRUE
)
currency |
Character vector. One or more currency codes. Use
|
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. Observation date.
Character. Currency code (e.g. "USD").
Numeric. Units of foreign currency per GBP.
https://www.bankofengland.co.uk/boeapps/database/
# GBP/USD since 2020
boe_exchange_rate("USD", from = "2020-01-01")
# Multiple currencies
boe_exchange_rate(c("USD", "EUR", "JPY"), from = "2020-01-01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.