Learn R Programming

priceR (version 0.1.6)

exchange_rate_latest: Retrieve the latest exchange rates between the provided currency code

Description

Retrieve the latest exchange rates between the provided currency code

Usage

exchange_rate_latest(currency)

Arguments

currency

A currency code (see currencies() for supported codes)

Value

A data.frame containing the latest exchange rates between the provided currency code and each other available currency

Examples

Run this code
# NOT RUN {
exchange_rate_latest("AUD")
# Daily AUD exchange rate as at end of day 2020-07-27 GMT
#     currency one_aud_is_equivalent_to
# 1        AED                  2.61894
# 2        AFN                 54.47724
# 3        ALL                 75.51799
# 4        AMD                343.40193
# 5        ANG                  1.26829
# 6        AOA                400.54604


# Defaults to USD
exchange_rate_latest()
# Daily USD exchange rate as at end of day 2020-07-27 GMT
#     currency one_usd_is_equivalent_to
# 1        AED                   3.6730
# 2        AFN                  76.4035
# 3        ALL                 105.9129
# 4        AMD                 481.6162
# 5        ANG                   1.7788
# 6        AOA                 561.7599


# }
# NOT RUN {
# }

Run the code above in your browser using DataLab