.get_rate {FinancialInstrument} | R Documentation |
get an exchange rate series
Description
Try to find exchange rate data in an environment, inverting if necessary.
Usage
.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
Examples
## Not run:
EURUSD <- getSymbols("EURUSD=x",src='yahoo',auto.assign=FALSE)
USDEUR <- .get_rate("USD","EUR")
head(USDEUR)
head(EURUSD)
## End(Not run)
[Package FinancialInstrument version 1.3.1 Index]