Search code examples
rwarnings

R: how to clear all warnings


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.warning, envir = baseenv()) :   
cannot remove variables from the base environment

any idea?


Solution

  • Try assign("last.warning", NULL, envir = baseenv())