我正在尝试从命令行运行 ar 脚本,但是在加载包时收到警告消息:
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
我试图使用suppressPackageStartupMessages
:
suppressPackageStartupMessages(library(RODBC))
或者supressMessages
suppressMessages(library(RODBC))
但这些并没有压制这些信息。如何摆脱这些警告?