-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add default handling to getQuote #291
Comments
Results are confusing. Docs say in setDefaults(name...), name = name of function, quoted or unquoted. setDefaults(getQuote.av, api.key='xxx')
# Error in setDefaults(getQuote.av, api.key = "xxx") : object 'getQuote.av' not found
setDefaults('quantmod:::getQuote.av', api.key='xxx')
# Error in get(fun, mode = "function", envir = envir) : object 'quantmod:::getQuote.av' of mode 'function' was not found
setDefaults('getQuote.av', api.key='xxx')
# works, huh |
@helgasoft Can you help me understand how this relates to the initial report. It looks like a separate issue. |
Maybe I entered the wrong room. Was searching for issues with getQuote and defaults ... |
Oh, that makes sense. I don't think this is related to the issue you uncovered, so I'd appreciate it if you create a new issue. For some examples of what Ethan is referring to by "import defaults", you can search for "importDefaults" in getSymbols.R. A bit more background: For example, you can set the default "from" date to 1 year ago. Then all your calls to setDefaults("getSymbols.yahoo", from = Sys.Date() - 365)
getSymbols("SPY")
head(SPY)
## [1] "SPY"
## SPY.Open SPY.High SPY.Low SPY.Close SPY.Volume SPY.Adjusted
## 2019-10-24 300.91 301.07 299.46 300.37 35453100 294.6716
## 2019-10-25 299.74 302.20 299.68 301.60 45205400 295.8783
## 2019-10-28 302.94 303.85 302.91 303.30 42147000 297.5460
## 2019-10-29 303.00 304.23 302.86 303.21 44284900 297.4577
## 2019-10-30 303.43 304.55 301.99 304.14 49643900 298.3701
## 2019-10-31 304.13 304.13 301.73 303.33 69053800 297.5754 |
Description
Some of the
getQuote
functions do not import defaultsExpected behavior
missing in:
getQuote
(master function)getQuote.yahoo
The text was updated successfully, but these errors were encountered: