This is a result of some new NA ('-' in google)values in the data from
google.  It has been reported and will be patched in a new version of
quantmod.

For now you can convert to numeric:

> getSymbols("AAPL", src="google")
[1] "AAPL"
> head(AAPL)
           AAPL.Open AAPL.High AAPL.Low AAPL.Close AAPL.Volume
2007-01-03 "86.29"   "86.58"   "81.90"  " 83.80"   "43223900"
2007-01-04 "84.05"   "85.95"   "83.82"  " 85.66"   "30032100"
2007-01-05 "85.77"   "86.20"   "84.40"  " 85.05"   "29335400"
2007-01-08 "85.96"   "86.53"   "85.28"  " 85.47"   "28089100"
2007-01-09 "86.45"   "92.98"   "85.15"  " 92.57"   "18471000"
2007-01-10 "94.75"   "97.80"   "93.45"  " 97.00"   "98946900"
> storage.mode(AAPL) <- "numeric"
Warning message:
In storage.mode(AAPL) <- "numeric" : NAs introduced by coercion
> head(AAPL)
           AAPL.Open AAPL.High AAPL.Low AAPL.Close AAPL.Volume
2007-01-03     86.29     86.58    81.90      83.80    43223900
2007-01-04     84.05     85.95    83.82      85.66    30032100
2007-01-05     85.77     86.20    84.40      85.05    29335400
2007-01-08     85.96     86.53    85.28      85.47    28089100
2007-01-09     86.45     92.98    85.15      92.57    18471000
2007-01-10     94.75     97.80    93.45      97.00    98946900


HTH,
Jeff


On Sat, Dec 15, 2012 at 11:51 PM, Robert A'gata <rhelpacc@gmail.com> wrote:

> Hi,
>
> I noticed that data obtained from google using getSymbols are all in
> character. I am wondering if there is any parameter I need to specify to
> make all into numeric? Or I have to really convert it column by column for
> each symbol I load? Thank you so much.
>
> > getSymbols("QQQ",src="google",from=START,to=END)
> [1] "QQQ"
> > head(QQQ)
>            QQQ.Open QQQ.High QQQ.Low QQQ.Close QQQ.Volume
> 2007-01-03 "43.46"  "44.06"  "42.52" "43.24"   " 60400600"
> 2007-01-04 "43.30"  "44.21"  "43.15" "44.06"   " 32940700"
> 2007-01-05 "43.93"  "43.95"  "43.48" "43.85"   " 17339400"
> 2007-01-08 "43.88"  "44.12"  "43.64" "43.88"   " 97154600"
> 2007-01-09 "44.00"  "44.29"  "43.63" "44.10"   " 11924900"
> 2007-01-10 "43.96"  "44.66"  "43.82" "44.62"   " 13260000"
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- 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.
>



-- 
Jeffrey Ryan
jeffrey.ryan@lemnica.com

www.lemnica.com

	[[alternative HTML version deleted]]

