Skip to contents

This function takes currency exchange rates data as input and returns a list of two strings containing the fastest and slowest growing currency exchange rate in relation to Canadian Dollar. The data provided contains currency code in the format FX***CAD, the average exchange rate and the date.

Usage

fastest_slowest_currency(start_date, end_date)

Arguments

start_date

inputted starting date in the format specified '%YYYY-%mm-%dd'

end_date

inputted ending date in the format specified '%YYYY-%mm-%dd'

Value

list of lists with fastest and slowest currency and the current exchange rate of the currencies in the given date range

Examples

fastest_slowest_currency('2019-05-23', '2022-05-30')
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
#>  ggplot2 3.4.0       dplyr   1.0.10
#>  tibble  3.1.8       stringr 1.5.0 
#>  readr   2.1.3       forcats 0.5.2 
#>  purrr   0.3.5      
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#>  dplyr::filter() masks stats::filter()
#>  dplyr::lag()    masks stats::lag()
#> [[1]]
#> [[1]][[1]]
#> [1] "TRY"
#> 
#> [[1]][[2]]
#> [1] 0.0708
#> 
#> 
#> [[2]]
#> [[2]][[1]]
#> [1] "IDR"
#> 
#> [[2]][[2]]
#> [1] 8.9e-05
#> 
#>