未能在R中加载新的ggplot2 [英] Failing to load the new ggplot2 in R

查看:949
本文介绍了未能在R中加载新的ggplot2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <$ c $我刚刚升级到新的ggplot2软件包(2.0.0),并一直收到错误消息。 C>> library(ggplot2)
get(method,envir = home)中的错误:
lazy-load database'C:/ Users /< blahblahblah> /Documents/R/win-library/3.2/ggplot2/ R / ggplot2.rdb'损坏
另外:警告消息:
1:package'ggplot2'是在R版本3.2.3下创建的
2:In .registerS3method(fin [i, 1],fin [i,2],fin [i,3],fin [i,4],:
重新启动中断诺言评估
3:在get(method,envir = home)
4:在get(method,envir = home)中:内部错误-3在R_decompress1
错误:'ggplot2'包或名称空间加载失败
code>

我可以在R中加载其他包,例如dplyr,这意味着我的R_decompress1应该没有任何问题所以我认为CRAN上的二进制文件可能会被损坏(不太可能,但是很容易检查)。我在github页面上使用了建议的方法来安装当前资源。

 > devtools :: install_github(hadley / ggplot2)

完成后,干净地,我收到以下错误(与前面类似)

 >库(ggplot2)
get(Info [i,1],envir = env)中的错误:
懒加载数据库'C:/Users/jclutter/Documents/R/win-library/3.2/ ggplot2 / R / ggplot2.rdb'损坏
另外:警告信息:
在get(Info [i,1],envir = env)中:内部错误-3在R_decompress1
错误:'ggplot2'的包或命名空间加载失败

我使用RStudio 0.99运行R版本3.2.1 .842在Windows 7平台上。任何想法?

编辑:



我被要求输出安装命令:

 > remove.packages('ggplot2')
从'C:/Users/jclutter/Documents/R/win-library/3.2'
中删除包(因为'lib'未指定)
> ; install.packages('ggplot2')
将软件包安装到'C:/Users/jclutter/Documents/R/win-library/3.2'
(因为'lib'未指定)
尝试URL'https://cran.rstudio.com/bin/windows/contrib/3.2/ggplot2_2.0.0.zip'
内容类型'application / zip'长度1977623字节(1.9 MB)
已下载1.9 MB

'ggplot2'包成功解压并检查MD5总和

下载的二进制包在
C:\ Users \jclutter\AppData\ Local \Temp\1\RtmpAHUju4\downloaded_pa​​ckages


解决方案

重新安装ggp​​lot2后应重新启动R。看到下面的Stackoverflow链接,因为这是一个类似的问题

提取(键)错误:lazy-load数据库


I just upgraded to the new ggplot2 package (2.0.0) and keep getting an error when I try to load it.

> library(ggplot2)
Error in get(method, envir = home) : 
  lazy-load database 'C:/Users/<blahblahblah>/Documents/R/win-library/3.2/ggplot2/R/ggplot2.rdb' is corrupt
In addition: Warning messages:
1: package ‘ggplot2’ was built under R version 3.2.3 
2: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4],  :
  restarting interrupted promise evaluation
3: In get(method, envir = home) :
  restarting interrupted promise evaluation
4: In get(method, envir = home) : internal error -3 in R_decompress1
Error: package or namespace load failed for ‘ggplot2’

I am able to load other packages in R, such a dplyr, which means there should not be anything wrong with my "R_decompress1" function as that is needed on all packages. I then thought that the binary on CRAN might be corrupted (unlikely, but an easy thing to check for). I use the suggested method on the github page to install from current sources.

> devtools::install_github("hadley/ggplot2")

After that completed cleanly, I received the following error (similar to the previous)

> library(ggplot2)
Error in get(Info[i, 1], envir = env) : 
  lazy-load database 'C:/Users/jclutter/Documents/R/win-library/3.2/ggplot2/R/ggplot2.rdb' is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
Error: package or namespace load failed for ‘ggplot2’

I am running R version 3.2.1 with RStudio 0.99.842 on a Windows 7 platform. Any thoughts?

edit:

I was requested for the output of the install command:

> remove.packages('ggplot2')
Removing package from ‘C:/Users/jclutter/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
> install.packages('ggplot2')
Installing package into ‘C:/Users/jclutter/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/ggplot2_2.0.0.zip'
Content type 'application/zip' length 1977623 bytes (1.9 MB)
downloaded 1.9 MB

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\jclutter\AppData\Local\Temp\1\RtmpAHUju4\downloaded_packages

解决方案

You should restart R after re-installing ggplot2. See the following Stackoverflow link as this is a similar problem

Error in fetch(key) : lazy-load database

这篇关于未能在R中加载新的ggplot2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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