我正在尝试更新dplyr包以解决rlang的问题,遵循网络上的相关建议。
首先,我使用remove.packages()命令删除了之前安装的dplyr。
然后我重新启动了R Studio。
这是故事的剩余部分:
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
[...]
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RevoUtilsMath_10.0.0 RevoUtils_10.0.5 RevoMods_11.0.0 MicrosoftML_1.5.0 mrsdeploy_1.1.2
[6] RevoScaleR_9.2.1 lattice_0.20-35 rpart_4.1-11
loaded via a namespace (and not attached):
[1] codetools_0.2-15 CompatibilityAPI_1.1.0 foreach_1.4.4 grid_3.4.1 R6_2.2.2
[6] jsonlite_1.5 curl_2.6 iterators_1.0.8 tools_3.4.1 yaml_2.1.14
[11] compiler_3.4.1 mrupdate_1.0.1
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
> install.packages('dplyr', dependencies = TRUE)
Installing package into ‘C:/Users/Alienware/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/dplyr_0.7.2.zip'
Content type 'application/zip' length 2881528 bytes (2.7 MB)
downloaded 2.7 MB
package ‘dplyr’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘dplyr’
The downloaded binary packages are in
C:\Users\Alienware\AppData\Local\Temp\RtmpucBaSk\downloaded_packages
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
转到R库路径(存储包的位置):
C:\Users\username\Documents\R\win-library\3.5
您可以参考this指南,了解如何查找R库路径。
接下来,只需在您的文件夹中搜索dplyr并将其删除即可。我发现这种手动方法对我有用,而不是通过Rstudio去除包装。希望能帮助到你!