-
Notifications
You must be signed in to change notification settings - Fork 16
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
Silence drm output #7
Comments
I have the same problem. Is there any update on this? I iterate over drm with purrr::map and use tryCatch to continue after an error occurs. This works. However, the error message is still printed, which messes up my progress bar. |
Hello, the error message comes from ‘optim()’ that is wrapped inside drc. I do not think it can be silenced from drc. |
Thank you for your answer. I already noticed that the problem is
|
Hello,
I do not think that the error in ‘optim()’ can be silenced by using the try() construct, as it originates from an external C-based routine and it is directly printed to the console (as far as I know). So I am incline to think that this is not a bug in drm. However, if you find a solution to silence it (perhaps from the authors of drc?), I’ll be happy to learn that.
All the best
Andrea
… On Jul 9, 2020, at 8:52 AM, jpquast ***@***.***> wrote:
Thank you for your answer. I already noticed that the problem is optim(). As far as I could see, it is called at least in drmOpt() which is called in drm(). However, it looks like the error of optim() is intended to be silenced since it is wrapped in try() with the option silent = TRUE. So this seems to be a bug. The only intended error message here seems to be "Convergence failed" which is part of drmOpt().
drmOpt <- function (opfct, opdfct1, startVec, optMethod, constrained, warnVal,
upperLimits, lowerLimits, errorMessage, maxIt, relTol, opdfct2 = NULL,
parmVec, traceVal, silentVal = TRUE, matchCall)
{
options(warn = warnVal)
if (is.null(opdfct2)) {
hes <- TRUE
}
else {
hes <- FALSE
}
psVec <- abs(startVec)
psVec[psVec < 1e-04] <- 1
{
if (!is.null(opdfct1)) {
if (constrained) {
nlsObj <- try(optim(startVec, opfct, opdfct1,
hessian = hes, method = "L-BFGS-B", lower = lowerLimits,
upper = upperLimits, control = list(maxit = maxIt,
reltol = relTol, parscale = psVec)), silent = silentVal)
}
else {
nlsObj <- try(optim(startVec, opfct, opdfct1,
hessian = hes, method = optMethod, control = list(maxit = maxIt,
reltol = relTol, parscale = psVec)), silent = silentVal)
}
.....
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIXJNIUV75XOWZH4N6VJEFTR2VSK3ANCNFSM4GYZHRZQ>.
|
I'm trying to silence all
drm
output, but it appears to be ignoring the options set indrmc
. For example:results in the output:
Session Info
The text was updated successfully, but these errors were encountered: