General suggestions for debugging in R

后端 未结 13 2396
梦毁少年i
梦毁少年i 2020-11-22 12:26

I get an error when using an R function that I wrote:

Warning messages:
1: glm.fit: algorithm did not converge 
2: glm.fit: algorithm did not converge 
         


        
13条回答
  •  鱼传尺愫
    2020-11-22 13:07

    My general strategy looks like:

    1. Run traceback() to see look for obvious issues
    2. Set options(warn=2) to treat warnings like errors
    3. Set options(error=recover) to step into the call stack on error

提交回复
热议问题