[R-SIG-Finance] Lo catches slow

Ilya Kipnis ||y@@k|pn|@ @end|ng |rom gm@||@com
Wed Mar 13 05:52:36 CET 2019


Minimum reproducible example:

require(quantmod)
require(TTR)

getSymbols('SPY')
data <- cbind(OHLC(SPY), stoch(HLC(SPY)))
head(Lo(data))
head(HLC(data))

Lo catches both the low from the OHLC object (which it's supposed to), and
the slowD column (because it has low in the name), which it isn't supposed
to.

This can cause issues down the line with other functions that call
functions that search for the Low column which might cause a dimnames error
down the line.

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list