currency_converter {yahoofinancer}R Documentation

Currency converter

Description

Retrieve current conversion rate between two currencies as well as historical rates.

Usage

currency_converter(
  from = "EUR",
  to = "USD",
  start = NULL,
  end = NULL,
  period = "ytd",
  interval = "1d"
)

Arguments

from

Currency to convert from.

to

Currency to convert to.

start

Specific starting date. String or date object in yyyy-mm-dd format.

end

Specific ending date. String or date object in yyyy-mm-dd format.

period

Length of time. Defaults to 'ytd' Valid values are:

  • '1d'

  • '5d'

  • '1mo'

  • '3mo'

  • '6mo'

  • '1y'

  • '2y'

  • '5y'

  • '10y'

  • 'ytd'

  • 'max'

interval

Time between data points. Defaults to '1d' Valid values are:

  • '1h'

  • '1d'

  • '5d'

  • '1wk'

  • '1mo'

  • '3mo'

Value

A data.frame.

Examples


currency_converter('GBP', 'USD', '2022-07-01', '2022-07-10')
currency_converter('GBP', 'USD', period = '1mo', interval = '1d')



[Package yahoofinancer version 0.3.0 Index]