我使用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
已经安装了以前的依赖项,例如安装要求安装“重塑”。我想知道我是否需要安装“ rtools”。因为我不是开发人员,所以看起来很傻-但如果可以,我会做。
答案 0 :(得分:0)
(不是真正的答案,但评论太久了)
对我来说,这两个都是从源仓库安装的:
install.packages("coefplot2",
repos="http://www.math.mcmaster.ca/bolker/R",
type="source")
并从github安装:
remotes::install_github("palday/coefplot2",
subdir = "pkg")
工作(后者只是R-forge回购的副本/镜像)-后者是最新的。
我的猜测是问题出在网络驱动器/ UNC路径上:还有其他here和here这样的SO问题表明这可能是个问题。
您可以尝试使用install.packages()
和lib='some_local_directory'
来使用library("coefplot2",lib.loc='some_local_directory')
吗?
此评论的最后一部分是,我已经从coefplot2
过渡到broom
(对于系数表)+ ggplot2
/ dotwhisker
-这是一个更具模块化的系统更加灵活,可以处理更广泛的模型类型。 (假设您对ggplot2
解决方案没问题。)