我知道如何手动重新安装所有软件包,但有一种单命令方式吗?以下显示update.packages()不起作用。
> library(xtable)
Error in library(xtable) : there is no package called ‘xtable’
> update.packages(checkBuilt=TRUE, ask=FALSE)
> library(xtable)
Error in library(xtable) : there is no package called ‘xtable’
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
> update.packages()
> library(xtable)
Error in library(xtable) : there is no package called ‘xtable’
>