我刚刚升级到新的ggplot2包(2.0.0)并在我尝试加载时不断收到错误.
> library(ggplot2) Error in get(method, envir = home) : lazy-load database 'C:/Users//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’
我能够在R中加载其他软件包,比如dplyr,这意味着我的"R_decompress1"函数应该没有任何问题,因为所有软件包都需要它.然后我认为CRAN上的二进制文件可能已损坏(不太可能,但检查起来很容易).我使用github页面上的建议方法从当前源安装.
> devtools::install_github("hadley/ggplot2")
干净地完成后,我收到以下错误(类似于前一个)
> 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’
我在Windows 7平台上使用RStudio 0.99.842运行R版本3.2.1.有什么想法吗?
编辑:
我被要求输出install命令:
> 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
steveb.. 33
重新安装ggplot2后应重新启动R. 请参阅以下Stackoverflow链接,因为这是一个类似的问题
fetch(key)出错:延迟加载数据库
重新安装ggplot2后应重新启动R. 请参阅以下Stackoverflow链接,因为这是一个类似的问题
fetch(key)出错:延迟加载数据库