currency_time_series: Currency Time Series

View source: R/currency_time_series.R

currency_time_seriesR Documentation

Currency Time Series

Description

Get currency exchange rate of the base currency in the time series period input by the user.

Arguments

start

String with the start date. The format should be "yyyy-mm-dd", for example "2021-12-31"

end

String with the end date. The format should be "yyyy-mm-dd", for example "2021-12-31"

base

String with the code of the base currency. Defaults to CAD, the canadian dollars.

Details

This function need the user input the start date and the end date and the base currency for getting the dataframe of the currency exchange rate during the time period.

Value

It will return a dataframe of the currency exchange rate of the base currency in the time period. If there is an error, it will return error and get the error message.

the column will be the specific date currency exchange rate and the row will be the aim currency for that exchange rate.

References

https://exchangerate.host/#/

Examples

## Not run: 
currency_time_series("2021-12-12", "2021-12-15", "USD")
currency_time_series("2021-01-01", "2022-01-01")

## End(Not run)

ysun822/currencychecker documentation built on March 26, 2022, 2:39 a.m.