qq_59000952 2021-06-04 16:55 采纳率: 0%
浏览 191

win7系统安装了R3.5.2版本,ggplot2装不上

1. 首先我尝试在线安装ggplot2,结果如下:

utils:::menuInstallPkgs()

  有二进制版本的,但源代码版本是后来的:
        binary source needs_compilation
ggplot2  3.3.0  3.3.3             FALSE

安装源码包‘ggplot2’

试开URL’https://mirrors.bfsu.edu.cn/CRAN/src/contrib/ggplot2_3.3.3.tar.gz'
Content type 'application/octet-stream' length 3058840 bytes (2.9 MB)
downloaded 2.9 MB

* installing *source* package 'ggplot2' ...
** 成功将'ggplot2'程序包解包并MD5和检查
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'lifecycle' 0.1.0 is already loaded, but >= 0.2.0 is required
ERROR: lazy loading failed for package 'ggplot2'
* removing 'F:/R-3.5.2/library/ggplot2'
In R CMD INSTALL

下载的程序包在
        ‘C:\Users\Administrator\AppData\Local\Temp\RtmpqgCgQp\downloaded_packages’里
Warning message:
In install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) :
  安装程序包‘ggplot2’时退出狀態的值不是0

2.我本地安装了lifecycle_0.2.0.tar.gz,结果如下:

utils:::menuInstallLocal()
* installing *source* package 'lifecycle' ...
** 成功将'lifecycle'程序包解包并MD5和检查
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'lifecycle'
    finding HTML links ... 好了
    badge                                   html  
    deprecate_soft                          html  
    deprecated                              html  
    expect_deprecated                       html  
Rd warning: C:/Users/Administrator/AppData/Local/Temp/RtmpWaByhf/R.INSTALL1a6c5a323918/lifecycle/man/expect_deprecated.Rd:17: file link 'expect_warning' in package 'testthat' does not exist and so has been treated as a topic
    last_warnings                           html  
    lifecycle-package                       html  
    signal_experimental                     html  
Rd warning: C:/Users/Administrator/AppData/Local/Temp/RtmpWaByhf/R.INSTALL1a6c5a323918/lifecycle/man/signal_experimental.Rd:28: file link 'signal' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: C:/Users/Administrator/AppData/Local/Temp/RtmpWaByhf/R.INSTALL1a6c5a323918/lifecycle/man/signal_experimental.Rd:29: file link 'signalCondition' in package 'base' does not exist and so has been treated as a topic
    verbosity                               html  
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (lifecycle)
In R CMD INSTALL

3. 然后我觉得可能是R版本太旧了,所以装不上,试着本地安装了ggplot2_3.1.0.tar.gz,结果如下:

> utils:::menuInstallLocal()
ERROR: dependencies 'lazyeval', 'plyr', 'reshape2' are not available for package 'ggplot2'
* removing 'F:/R-3.5.2/library/ggplot2'
In R CMD INSTALL
Warning message:
In install.packages(files[tarballs], .libPaths()[1L], repos = NULL,  :
  安装程序包‘F:/R-3.5.2/library/ggplot2_3.1.0.tar.gz’时退出狀態的值不是0

 

4. 我又本地安装了plyr_1.8.5.tar.gz,结果如下:
> utils:::menuInstallLocal()
* installing *source* package 'plyr' ...
** 成功将'plyr'程序包解包并MD5和检查
** libs

*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'plyr'
* removing 'F:/R-3.5.2/library/plyr'
In R CMD INSTALL
Warning message:
In install.packages(files[tarballs], .libPaths()[1L], repos = NULL,  :
  安装程序包‘F:/R-3.5.2/library/plyr_1.8.5.tar.gz’时退出狀態的值不是0

 

  因为我的rstudio 装了1.1.462exe,适配的R版本就用了R 3.5.2

求助:该怎样操作才能安装上合适的ggplot2?

  • 写回答

1条回答 默认 最新

  • 有问必答小助手 2021-06-07 19:31
    关注

    你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答

    本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。

    ​​​​因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。

    评论

报告相同问题?

悬赏问题

  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?