【发布时间】:2016-12-18 06:27:13
【问题描述】:
我在工作 PC 上的 RStudio 0.99.903 中使用 R.3.3.1。
我在尝试同时使用 ggplot2 和 tidytext 时遇到相同的错误消息:虽然我设法安装了这两个包,但当我启动它们时,我收到了以下错误消息:
Error : package ‘grid’ does not have a namespace
起初我认为这意味着网格丢失了,但我读到它现在是基础的一部分,所以我不明白为什么在我运行 library(grid) 时它不加载...让我感到困惑的是事实我只能在我的包列表中看到 gridBase 和 gridExtra,而不是网格。当我尝试 library(gridBase) 时,我也会收到相同的“错误:包‘grid’没有命名空间”消息。
这是我的会话信息:
会话信息() R 版本 3.3.1 (2016-06-21) 平台:x86_64-w64-mingw32/x64(64位) 运行于:Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] stringr_1.0.0 tidyr_0.5.1 scales_0.4.0 lubridate_1.5.6 purrr_0.2.2 dplyr_0.5.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.6 assertthat_0.1 R6_2.1.2 plyr_1.8.4 DBI_0.4-1 magrittr_1.5 stringi_1.1.1
[8] lazyeval_0.2.0 tools_3.3.1 munsell_0.4.3 colorspace_1.2-6 tibble_1.1
我在网上到处查看并尝试了各种方法(使用旧版本的 R,更改我的 RStudio 全局选项中的默认 CRAN,取消选中“使用 Internet Explorer 库代理”,从 R 中删除并重新安装包RStudio,GUI 和 Shell...)但没有任何效果...
【问题讨论】:
-
问题解决了我想...我会在这里分享这个,以防它帮助其他人。我最终手动将文件夹网格从我的 R.3.2.3 中的库文件夹复制到我的 R.3.3.1 中的库文件夹。我现在可以同时加载 ggplot2 和 tidytext。不完全是我希望的优雅解决方案,但乞丐可以选择......
标签: r ggplot2 namespaces r-grid