首页 > 解决方案 > 当前版本的 R 版本 3.6.1 (2019-07-05) 是否仍支持 coefplot2 - “脚趾动作”

问题描述

我使用 coefplot2 绘制生态数据的回归估计。我有一台新电脑,所以只是设置。所有其他适用于新设置的包和代码。但是非常喜欢继续使用 coefplot2 但需要帮助。

我已尝试使用 R forge 和 bolker 源站点安装 coefplot2,如这里的几篇文章和其他站点上的推荐,但没有运气。

install.packages("coefplot2", repos="http://www.math.mcmaster.ca/bolker/R", type="source")

install.packages("coefplot2",repos="http://r-forge.r-project.org")

> install.packages("coefplot2", repos="http://www.math.mcmaster.ca/bolker/R", type="source")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘\\staff.ad.griffith.edu.au/ud/fr/s2903680/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://www.math.mcmaster.ca/bolker/R/src/contrib/coefplot2_0.1.3.2.tar.gz'
Content type 'application/x-gzip' length 1357869 bytes (1.3 MB)
downloaded 1.3 MB

'\\staff.ad.griffith.edu.au\ud\fr\s2903680\Desktop\Research\data_analysis_pumice\havre'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
* installing *source* package 'coefplot2' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in findpack(package, lib.loc) : 
  there is no package called 'coefplot2'
Calls: <Anonymous> -> findpack
Execution halted
ERROR: lazy loading failed for package 'coefplot2'
* removing '\\staff.ad.griffith.edu.au/ud/fr/s2903680/Documents/R/win-library/3.6/coefplot2'
Warning in install.packages :
  installation of package ‘coefplot2’ had non-zero exit status    

已经安装了以前的依赖项,例如安装要求安装“reshape”。我想知道我是否需要安装“rtools”。看起来很傻,因为我不是开发人员 - 但如果它有效,我会这样做。

标签: rcoefplot

解决方案


(不是真正的答案,但评论太长了)

对我来说,两者都是 install-with-source-from-repo:

install.packages("coefplot2",
    repos="http://www.math.mcmaster.ca/bolker/R",
    type="source")

并从 github 安装:

 remotes::install_github("palday/coefplot2",
           subdir = "pkg")

工作(后者只是 R-forge 回购的副本/镜像) - 后者是最新的。

我的猜测是问题出在网络驱动器/UNC 路径上:这里这里还有其他 SO 问题表明这可能是一个问题。

你可以试试install.packages()lib='some_local_directory'然后library("coefplot2",lib.loc='some_local_directory')

这条评论的最后一部分是我已经从coefplot2broom(用于系数表)+ ggplot2/ dotwhisker- 它是一个更加模块化的系统,更加灵活并且可以处理更广泛的模型类型。(假设你对ggplot2解决方案没意见。)


推荐阅读