Skip to content
Prev 7220 / 15274 Next

?getSymbol.MySQL

On 12/30/2010 03:03 PM, Mark Knecht wrote:
Well, certainly there's the RMySQL package...

The 'don't call this directly' bit is a reference to setSymbolLookup. 
Ideally, you use setSymbolLookup to tell getSymbols which method (yahoo, 
rda, google, oanda, MySQL, etc.) to use for a particular symbol.  We do 
that with a little custom function that runs in everybody's .Rprofile to 
point getSymbols at all our in-house tick data stored in rda files by 
day (see getSymbols.FI in the FinancialInstrument package).

I would recommend that you pull apart getSymbols.MySQL and add the 
columns you want.  Make sure you rename the OHLCV or tick data columns 
in your output xts object to line up with what the other quantmod 
functions expect, but otherwise just use whatever columns you want from 
your data.

then use setSymbolLookup to tell getSymbols to use your method function 
'getSymbols.MK_mySQL' (or whatever) to load those symbols.

Regards,

  - Brian