[R-SIG-Finance] question in quantmod package
Johnson, Cedrick W.
cedrick at cedrickjohnson.com
Mon Aug 9 16:05:08 CEST 2010
you could try:
OHLC(get(stock)) and colnames(get(stock))
On 08/09/2010 06:48 AM, Raghuraman Ramachandran wrote:
> I am trying to pass a stock's name as an argument to a function and then I
> am trying to use getSymbols to get data. For example,
> stock = getSymbols(stock) returns "AAPL"
> But, if I do an OHLC(stock) it cribs. Also colnames(stock) returns NULL as
> stock is still considered a string rather than an AAPL. How do I overcome
> this problem pls?
> Basically I want the variable stock to exactly mimic the returned object of
> [[alternative HTML version deleted]]
> R-SIG-Finance at stat.math.ethz.ch mailing list
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
More information about the R-SIG-Finance