0
require(quantmod)
wateroasis <- getSymbols("1161.hk", auto.assign=FALSE)
# Then I get the stock prices

>1161.HK
Error: unexpected symbol in "1161.HK"

However, if I tried another ticker such as "AAPL" the problem doesn't exist.

How do I solve this problem?

tonytonov
  • 25,060
  • 16
  • 82
  • 98
Bigchao
  • 1,746
  • 3
  • 15
  • 31
  • 2
    You set `auto.assign=FALSE` and assigned the output of `getSymbols` to `wateroasis`. Why do you expect the `1161.HK` object to even exist? If you left `auto.assign=TRUE` (the default), you can access `1161.HK` by wrapping it in back-ticks `\`1161.HK\`` – Joshua Ulrich May 23 '14 at 13:06
  • Thanks Joshua, that's the point! – Bigchao Jun 01 '14 at 07:54

0 Answers0