View source: R/yf_get_index_components.R
| yf_index_composition | R Documentation | 
Get current composition of stock indices
yf_index_composition(
  mkt_index,
  do_cache = TRUE,
  cache_folder = yf_cachefolder_get(),
  force_fallback = FALSE
)
| mkt_index | the index (e.g. IBOV, SP500, FTSE) | 
| do_cache | Use cache system? (default = TRUE) | 
| cache_folder | Where to save cache files? (default = yfR::yf_cachefolder_get() ) | 
| force_fallback | Logical (TRUE/FALSE). Forces the function to use the fallback system | 
A dataframe with the index composition (column might vary)
df_sp500 <- yf_index_composition("SP500")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.