I am running an ordinary R script in which I have a self-written function. The function makes use of rm()
which often produces warnings I do not want to appear in console output. Any of these solutions:
- hiding warnings from
rm
usage from this particular self-written function, - hiding warnings from all usages of
rm
(globally for an R session)
would satisfy me.
foo.function <- function(){
rm(foo.object)
print("foo")
}
foo.function()
# [1] "foo"
# Warning message:
# In rm(foo.object) : object 'foo.object' not found