I'd like to create a function "clearall" which is able to run to code rm(list = ls()) to clear my environment easily.
The problem being that the code run perfectly when executed in the console, but not when I run the function clearall() :
clearall = function(){
rm(list = ls())
}
Does anyone know why and how to fix it please ?