joshuaulrich / quantmod

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

importDefaults() has a get() with length > 1 #319

Closed joshuaulrich closed 3 years ago

joshuaulrich commented 3 years ago

Description

get() with length > 1 now throws an error under R-devel as of r79474. importDefaults() throws this error for the example below, which causes R CMD check to fail on quantmod_0.17.0 on CRAN.

Minimal, reproducible example

my.fun <- function(x=3)
{
  importDefaults('my.fun')
  x^2
}

my.fun() # returns 9

setDefaults(my.fun, x=10)
my.fun() # returns 100
my.fun(x=4)