-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
Spurious warning messages with mgcv and quantreg #610
Comments
The fact is these warnings indeed happened, but were suppressed by an imperfect approach, namely It happened that someone reported the same problem of the In mgcv, there were two instances of $ cd mgcv
$ grep 'options(warn=-1)' -r .
./R/mgcv.r: { op <- options(warn=-1) ## don't want to be warned it's not +ve def
./R/plots.r: { old.warn<-options(warn=-1) I strongly recommend the author to use |
Have you then drawn this to the attention of the authors of the mgcv and quantreg packages? On 24/09/2013, at 4:28 PM, Yihui Xie notifications@github.com wrote:
|
No, perhaps you can do that? |
Actually, I think it should be raised on r-devel. The issue will affect other packages also. The gam() calculations have an internal process by which singularities that arise from an The function mroot() has the code fragment: This is a case where the matrix A is non-negative definite by construction. The better vis.gam(), in the file plots.r in the mgcv source, also turns warnings off briefly. The |
The reason that knitr can capture the warning even when > suppressWarnings
function (expr)
{
ops <- options(warn = -1)
on.exit(options(ops))
withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
} On the other hand, It may worth a discussion in r-devel whether |
If I were to raise this on r-devel, I'd want to say that I have been discussing Maybe however it would come better from you, because there is an issue of What I do not want to do is to set 'warning=FALSE' whenever I execute a code |
I just made the changes in evaluate, and you can test the devel version here: install.packages('evaluate',,'http://www.rforge.net/') I guess I'm not going to bother r-devel at the moment. It is not anything urgent. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
The following runs without problem from the command line:
However, when I insert this code into an Sweave file and process
the file using knit(); the following appears in the .tex file that is
generated:
A student has reproduced this on a Windows machine.
Such a warning has appeared for any use of the function gam() that I have tried.
I get similar warning messages when using rq() from the quantreg package.
The text was updated successfully, but these errors were encountered: