getHoldings.iShares.ca: Get the holdings of Canadian iShares ETFs

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/getHoldings.iShares.ca.R

Description

Get the names and weights of Canadian iShares ETFs.

Usage

1
2
  getHoldings.iShares.ca(Symbols, env = .GlobalEnv,
    auto.assign = TRUE)

Arguments

Symbols

chr Symbols of ETFs (if not supplied, the symbols of all Canadian iShares will be used)

env

environment to store the holdings data in

auto.assign

assign data?

Details

This function can be called by getHoldings, or it can be called directly

Some ETFs have more than one holding listed with the same Symbol. In the case that Symbols are duplicated, a “duplicates” attribute will be added to the returned object. Also, since rownames cannot be duplicated, they will be made unique with make.unique

Value

An object classed as “holdings” will be created that is a data.frame with columns for holdings' weights and names. If called with auto.assign=TRUE, it will be assigned in env with names that are Symbols appended with “.h”. Otherwise, the “holdings” will be returned and not stored.

Author(s)

Garrett See

References

www.ishares.com#'

See Also

getHoldings

Examples

1
2
3
4
5
## Not run: 
getHoldings.iShares.ca("XIU")
XIU.h

## End(Not run)

qmao documentation built on May 2, 2019, 4:54 p.m.