在RStudio中加载ggplot2时出错

时间:2015-06-29 17:32:40

标签: r windows ggplot2 rstudio

我看到了这个问题的一个版本,但仍然没有看到答案。我试图使用ggplot2,但得到以下错误

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called ‘stringi’
Error: package or namespace load failed for ‘ggplot2’

我安装了stringi - 导致此错误

There is a binary version available but the source version is
later:
        binary source needs_compilation
stringi  0.5-2  0.5-5              TRUE

  Binaries will be installed
 trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/stringi_0.5-2.zip'
Warning in install.packages :
 cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
 cannot open URL    'http://cran.rstudio.com/bin/windows/contrib/3.2/stringi_0.5-2.zip'
Warning in install.packages :
  download of package ‘stringi’ failed

然后我读了这个问题 - package 'stringi' does not work after updating to R3.2.1。并遵循使用该选项并为我的Windows版本获取二进制文件的建议

> options(install.packages.check.source = "no")
> install.packages("stringi",type="win.binary")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/stringi_0.5-2.zip'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/stringi_0.5-2.zip'
Warning in install.packages :
  download of package ‘stringi’ failed

现在我的分析因此而停滞不前;没有ggplot2。

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] gridExtra_0.9.1 scales_0.2.5    lattice_0.20-31

loaded via a namespace (and not attached):
[1] Rcpp_0.11.6      digest_0.6.8     plyr_1.8.3       gtable_0.1.2    
[5] proto_0.3-10     tools_3.2.0      munsell_0.4.2    colorspace_1.2-6
[9] knitr_1.10.5  

0 个答案:

没有答案