R: how to clear all warnings

后端 未结 3 1844
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 10:00

I would like to clear the warnings() list using a command line.

I have tried with no success

> rm(last.warning, envir = baseenv())  
Error in rm(last.         


        
3条回答
  •  爱一瞬间的悲伤
    2021-01-30 10:56

    Take a look at suppressWarnings() to stop the warnings from showing up.

    Notice in the help page for warnings that it says:

    "....It is undocumented where last.warning is stored nor that it is visible, and this is subject to change. Prior to R 2.4.0 it was stored in the workspace, but no longer...."

提交回复
热议问题