get an exchange rate series

Description

Try to find exchange rate data in an environment, inverting if necessary.

Usage

1
.get_rate(ccy1, ccy2, env = .GlobalEnv)

Arguments

ccy1

chr name of 1st currency

ccy2

chr name of 2nd currency

env

environment in which to look for data.

Value

xts object with as many columns as practicable.

Author(s)

Garrett See

See Also

buildRatio redenominate

Examples

1
2
3
4
5
6
7
## Not run: 
EURUSD <- getSymbols("EURUSD=x",src='yahoo',auto.assign=FALSE)
USDEUR <- .get_rate("USD","EUR")
head(USDEUR)
head(EURUSD)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.