Displaying 1 result from an estimated 1 matches for "sumreg".
Did you mean:
subreg
2002 May 02
1
how to trap any warnings from an R function -- again :(
With the incorporation of the useful hints, my user function now looks like
this:
userfn <- function() {
...
ow <- options("warn")
options(warn = 2);
...
reg<-try(polr(act~.,data=mm,Hess=TRUE))
...
sumreg<-try(summary(reg))
print(length(sumreg))
print(sumreg)
...
options(ow) # reset
}
The routine userfn() is called multiple times, two of which I happen to know
to have warnings about NaNs being produced. However, only once was the
condition caught, with the following output from the print sta...