Description Usage Arguments Value See Also Examples
get the components of the specific sector on certain day.
1 2 | getSectorComp(sectorID, endT = Sys.Date(), drop = TRUE,
datasrc = defaultDataSRC())
|
sectorID |
ID of the sector. eg. "ES09440000" for "financial service" the 1st level sector of SHENWAN; "ES09440100" for "bank" the 2nd level sector of SHENWAN. Get details with |
endT |
a vector of class |
drop |
if drop the field of date and return a vector when endT is length 1 ? |
If endT
is missing or is length 1 and drop
is TRUE, a vector of stockID of the components; else a dataframe, with cols: "date" and "stockID"
Other getComps functions: getComps
,
getIndexCompWgt
1 2 3 | tmp <- getSectorComp("ES09440000") # get the latest components, a vector
tmp <- getSectorComp("ES09440000",as.Date("2012-12-31")) # get the components on single day,a vector
tmp <- getSectorComp("ES09440000",as.Date(c("2011-12-31","2012-12-31"))) # get the components on multi-days, a data frame
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.