R错误包网格没有名称空间 [英] R error package grid does not have a namespace

查看:282
本文介绍了R错误包网格没有名称空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在试图使用两者时,我遇到了同样的错误信息

在RStudio 0.99.903中,我在工作PC上使用R.3.3.1。 ggplot2和tidytext:尽管我设法安装了这两个软件包,但是当我启动它们时,我收到以下错误消息:

 错误:package' grid'没有命名空间

起初我以为这意味着网格丢失了,但我读到它是现在基地的一部分,所以我不明白为什么它不加载时,我运行图书馆(网格)...添加到我的困惑是事实,我只能看到gridBase和gridExtra在我的软件包列表中,而不是网格。当我尝试库(gridBase)我也得到相同的错误:包'网格'没有命名空间消息。



这是我的会话信息:


sessionInfo()
R版本3.3.1(2016-06-21)
平台:x86_64-w64-mingw32 / x64(64位)
运行于:Windows 7 x64(内部版本7601)Service Pack 1




 区域设置:
[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

附加基础包:
[1]统计图形grDevices utils数据集方法基础

其他附加软件包:
[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

通过命名空间加载(并未附加):
[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中删除并重新安装软件包...),但没有任何工作...



帮助。 ..!

解决方案

卸载我认为我没有使用的软件包后,发生了这种情况。 Grid是Rstudio软件包窗口中列出的一个软件包,我将它与其他约20个软件一起删除。没有网格阻止加载ggplot2,反过来阻止加载rstan。

我通过重新安装R恢复,假设这样一个基本包必须是基础安装,因为它不在CRAN上。重新安装后,与网格相关的错误消失了,但缩放包现在被识别为丢失。 尺度在CRAN上,很容易加载。库(ggplot2)出现再次工作。


I'm using R.3.3.1 in RStudio 0.99.903 on a work PC.

i'm having the same error message when trying to use both ggplot2 and tidytext: although I managed to install both packages, when i launch them i get this error message:

Error : package ‘grid’ does not have a namespace

At first i thought this meant grid was missing but i read that it's now part of base so i don't understand why it doesn't load when i run library(grid)... Adding to my confusion is the fact that i can only see gridBase and gridExtra in my list of packages, not grid. And when i try library(gridBase) i also get the same "Error : package ‘grid’ does not have a namespace" message.

Here's my session info:

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: 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   

i've looked everywhere online and tried various approaches (using an older version of R, changing the default CRAN in my RStudio global options, unticking "use internet explorer library proxy", remove and re-install the packages from R not RStudio, both GUI and Shell...) but nothing works...

help...!

解决方案

This happened to me after unloading packages that I thought I was not using. "Grid" was a package listed in the Packages window in Rstudio and I deleted it along with about 20 others. Not having "grid" prevented loading "ggplot2" which in turn prevented loading "rstan".

I recovered by reinstalling R, presuming that such a fundamental package must be part of the base install since it was not on CRAN. After reinstall, the error related to "grid" disappeared, but the package "scales" was now identified as missing. "Scales" was on CRAN and easily loaded. library(ggplot2) appear to be working again.

这篇关于R错误包网格没有名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆