Description Usage Arguments Details Value
View source: R/convert_currency.R
convert_currency
produces an exchange rate between two currencies for
a specified date range.
1 2 3 4 5 6 | convert_currency(
currency_from = "USD",
currency_to = "CAD",
start_date,
end_date
)
|
currency_from, currency_to |
A character scalar indicating the currency
to be converted from or to. Valid country codes can be found using the
function |
start_date, end_date |
A date or a character string which can be coerced to a date. A date range will be constructed from the first day of the month in which 'start_date' is located and the last day of the month in which 'end_date' is located. |
A function for producing an exchange rate for two countries' currencies over
a specified period of time. The function uses the fixer.io currency
conversion service, and relies on the fixerapi
package, which must be
separately installed. A fixer.io API key must also be supplied, either
through the fixerapi::fixer_api_key
function or by adding the key as a
FIXER_API_KEY variable in .Renviron.
A table with two columns: 'year_month' and 'exchange_rate'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.