alexanderrobitzsch / TAM

Test Analysis Modules
https://alexanderrobitzsch.github.io/TAM/
15 stars 9 forks source link

Argument verbose leads to error when used in wrapper function #2

Closed hplieninger closed 6 years ago

hplieninger commented 6 years ago

Sorry to bother you again with the argument verbose. When I write a wrapper function around tam.mml(), using verbose results in an error:

f1 <- function(verbose = FALSE, ...) {
    TAM::tam.mml(verbose = verbose, ...)
}

data(data.sim.rasch, package = "TAM")

mod1 <- f1(resp = data.sim.rasch, verbose = TRUE)
#> Error in if (progress) {: argument is not interpretable as logical

I don't fully understand everything surrounding tam_args_CALL_search() , but I think that args_CALL <- as.list( sys.call() ) (in tam.mml()) should be replaced with something along the lines of https://stackoverflow.com/q/17256834 to fix that?

It's not urgent, because I can still use f1(resp = data.sim.rasch, control = list(progress = FALSE)), but I wanted to let you know.

alexanderrobitzsch commented 6 years ago

Yes, I agree. I decided for a quick fix in TAM 2.11-47 (dev; posted in some minutes) although your suggestion would perfectly fit.