Displaying 6 results from an estimated 6 matches for "withwarn".
Did you mean:
wishware
2018 Mar 06
0
Capturing warning within user-defined function
...re warnings by using withCallingHandlers. Here is an example,
its help file has more information.
dataList <- list(
A = data.frame(y=c(TRUE,TRUE,TRUE,FALSE,FALSE), x=1:5),
B = data.frame(y=c(TRUE,TRUE,FALSE,TRUE,FALSE), x=1:5),
C = data.frame(y=c(FALSE,FALSE,TRUE,TRUE,TRUE), x=1:5))
withWarnings <- function(expr) {
.warnings <- NULL # warning handler will append to this using '<<-'
value <- withCallingHandlers(expr,
warning=function(e) {
.warnings <<- c(.warnings,
conditionMessage(e))...
2010 Jan 11
2
warning inside loop
Hi,
I'm running some data simulations using (mixed effects)* regression models
that show difficulty to converge. Therefore, I seek a way of capturing
warnings (of false convergence) inside a loop.
Inside that loop, I modify data and estimate a model. I do so many times
with slightly different modifications of the data. Next, I extract some of
the model parameters and store these in a matrix.
2018 Mar 06
4
Capturing warning within user-defined function
Hi, I am trying to automate the creation of tables for some simply
analyses. There are lots and lots of tables, thus the creation of a
user-defined function to make and output them to excel.
My problem is that some of the analyses have convergence issues, which I
want captured and included in the output so the folks looking at them know
how to view those estimates.
I am successfully able to do
2018 Mar 06
1
Capturing warning within user-defined function
tryCatch() is good for catching errors but not so good for warnings, as
it does not let you resume evaluating the expression that emitted
the warning. withCallingHandlers(), with its companion invokeRestart(),
lets you collect the warnings while letting the evaluation run to
completion.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Mar 6, 2018 at 2:45 PM, Bert Gunter <bgunter.4567 at
2023 Apr 21
0
[Rd] R 4.3.0 is released
...n the reverse order using
the Shift+TAB key, improving accessibility of the Rgui
configuration editor.
* qnorm(<very large negative>, log.p=TRUE) is now fully accurate
(instead of to "only" minimally five digits).
* demo(error.catching) now also shows off withWarnings() and
tryCatchWEMs().
* As an experimental feature the placeholder _ can now also be used
in the rhs of a forward pipe |> expression as the first argument
in an extraction call, such as _$coef. More generally, it can be
used as the head of a chain of extractions,...
2023 Apr 21
0
[Rd] R 4.3.0 is released
...n the reverse order using
the Shift+TAB key, improving accessibility of the Rgui
configuration editor.
* qnorm(<very large negative>, log.p=TRUE) is now fully accurate
(instead of to "only" minimally five digits).
* demo(error.catching) now also shows off withWarnings() and
tryCatchWEMs().
* As an experimental feature the placeholder _ can now also be used
in the rhs of a forward pipe |> expression as the first argument
in an extraction call, such as _$coef. More generally, it can be
used as the head of a chain of extractions,...