I'm trying to run a r script from the command line, but I get warning messages when packages are loaded:
C:Temp>Rscript myscript.r param
Warning message:
package 'RODBC' was built under R version 3.0.1
Warning message:
package 'ggplot2' was built under R version 3.0.1
Warning message:
package 'reshape2' was built under R version 3.0.1
Warning message:
package 'lubridate' was built under R version 3.0.1
Warning message:
package 'scales' was built under R version 3.0.1
I' tried to use suppressPackageStartupMessages
:
suppressPackageStartupMessages(library(RODBC))
or supressMessages
suppressMessages(library(RODBC))
but these did not suppress these messages. How to get rid of these warnings?
question from:
https://stackoverflow.com/questions/18931006/how-to-suppress-warning-messages-when-loading-a-library 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…