joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
818 stars 224 forks source link

setDefaults for getQuote.av #316

Closed helgasoft closed 3 years ago

helgasoft commented 3 years ago

Description

Documentation says in setDefaults(name...), name = name of function, quoted or unquoted. For getQuote.av only the quoted name works.

Expected behavior

both quoted or unquoted names to work

Minimal, reproducible example

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
joshuaulrich commented 3 years ago

Thanks for the report! It looks like this is because getQuote.av() is not exported from the quantmod namespace. I'll investigate.

joshuaulrich commented 3 years ago

This took much longer than I expected (10-12 hours), but I finally got it working. Please give it a try and let me know if you run into any edge cases.

helgasoft commented 3 years ago

Thank you, the updated version 0.4.17.1 works fine.