Skip to content
Prev 3453 / 15274 Next

Newbie question on getSymbols() in quantmod

An alternate approach uses setSymbolLookup

setSymbolLookup(HSBC=list(src='yahoo', name="0005.HK"))

You can put this in a start up file for future R sessions.  See ?setSymbolLookup
[1] "HSBC"
An 'xts' object from 2007-01-01 to 2008-12-29 containing:
  Data: num [1:510, 1:6] 142 143 144 145 144 ...
 - attr(*, "dimnames")=List of 2
  ..$ : NULL
  ..$ : chr [1:6] "0005.HK.Open" "0005.HK.High" "0005.HK.Low"
"0005.HK.Close" ...
  Indexed by objects of class: [Date]
   xts Attributes:
List of 2
 $ src    : chr "yahoo"
 $ updated: POSIXct[1:1], format: "2008-12-31 05:02:43"

HTH
Jeff
On Tue, Dec 30, 2008 at 9:31 PM, Brian Lee Yung Rowe <brian at muxspace.com> wrote: