Skip to content

getSymbols return value does not correspond to the name created #371

@ggrothendieck

Description

@ggrothendieck

This works:

library(quantmod)
tickers <- "AAPL"
tickers.out <- getSymbols(tickers)
L <- mget(tickers.out)

but this next one does not because the object it creates is called "IXIC" and not "^IXIC". The output of getSymbols should correspond to the object names that are created, not to the input symbols. Alternately make the output objects the same as the input object names.

library(quantmod)
tickers <- "^IXIC"
tickers.out <- getSymbols(tickers)
L <- mget(tickers.out)
## Error: value for ‘^IXIC’ not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions