I did explore tryCatch but wasn't successful.
However, I did just try your solution, William, and it worked!
I just had to modify this line in my function:
p <- ((svyciprop(~grp, grp1, family=quasibinomial))[1])
to
p <- withWarnings((svyciprop(~grp, grp1, family=quasibinomial))[1])
Then I cou
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 Dunl
Hi William,
Thanks, I'll give that a shot. I tried using withCallingHandlers without
success but II admit I'm not familiar with it and may have used it wrong.
I'll report back.
Jen
On Tue, Mar 6, 2018, 5:42 PM William Dunlap wrote:
> You can capture warnings by using withCallingHandlers. H
1. I did not attempt to sort through your voluminous code. But I suspect
you are trying to reinvent wheels.
2. I don't understand this:
"I've failed to find a solution after much searching of various R related
forums."
A web search on "error handling in R" **immediately** brought up ?tryCatch,
w
You can capture 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)
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
6 matches
Mail list logo