从昨天开始,我无法通过library命令加载一些常用的包,例如reshape2
和stringr
。
重现我的问题的步骤:
1)在Rstudio server(版本0.99.467)中启动一个新会话。我还关闭了Rstudio server中的活动会话。
2)运行以下代码
library(ggplot2)
library(stringr)
3) 出现错误信息:
Error in unloadNamespace(package) : namespace ‘stringr’ 被 ‘reshape2’ 导入,因此无法卸载 Show Traceback
使用Debug重新运行
Error in library(stringr) : “stringr” 版本0.6.2 无法被卸载。
但是如果在加载 ggplot2
之前加载 stringr
,则不会出现错误。我该如何解决这个问题。感谢您的任何建议。
我可能需要更新R到3.2版
我的R会话信息:
R version 3.1.3 (2015-03-09)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_1.0.0
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 digest_0.6.4 grid_3.1.3 gtable_0.1.2 MASS_7.3-39 munsell_0.4.2 plyr_1.8.1
[8] proto_0.3-10 Rcpp_0.11.2 reshape2_1.4 scales_0.2.4 stringr_0.6.2 tools_3.1.3