getIndexComp: getIndexComp

Description Usage Arguments Value Examples

Description

get the components of the specific index on certain day.

Usage

1
2

Arguments

indexID

the stockID of the index

endT

a vector of class Date. IF missing, then get the latest components.

drop

if drop the field of date and return a vector when endT is length 1 ?

Value

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"

Examples

1
2
3
4
5
tmp <- getIndexComp("EI000300",drop=TRUE) # get the latest components, a vector
tmp <- getIndexComp("EI000300") # get the latest components, a dataframe
tmp <- getIndexComp("EI000300",as.Date("2012-12-31")) # get the components on single day,a vector
tmp <- getIndexComp("EI000300",as.Date(c("2011-12-31","2012-12-31"))) # get the components on multi-days, a data frame
tmp <- getIndexComp("EI000300",as.Date(c("2005-12-31","2012-12-31"))) # get the components before index's pubdate, a data frame

raphael210/QDataGet documentation built on May 26, 2019, 11:02 p.m.