无法在R

时间:2018-04-14 21:51:01

标签: r

我在安装glmmADMB软件包时遇到问题,希望能在这里得到一些帮助。我已经和我认识的使用过R的人谈过了,但是我们无法解决这个问题。

看起来错误与目录中的符号有关。但是,'是包含在Windows中的默认命名约定,我似乎无法更改文件夹名称。我将我的电脑命名为Vanessa,并自动为用户提供文件夹名称" Vanessa的PC"。 [它可能不是由于这个错误,因为我在命令中运行了一些包含此符号的其他代码。]任何建议或想法将不胜感激。

这是我得到的日志:

  

install.packages(" glmmADMB&#34 ;,   + repos = c(" http://glmmadmb.r-forge.r-project.org/repos",   + getOption(" repos")),   + type =" source")   将软件包安装到'C:/ Users / Vanessa&#39 / PC / Documents / R / win-library / 3.4'   (因为'lib'未指定)   尝试访问网址' http://glmmadmb.r-forge.r-project.org/repos/src/contrib/glmmADMB_0.8.3.3.tar.gz'   内容类型' application / x-gzip'长度9391177字节(9.0 MB)   已下载9.0 MB

  • 安装包' glmmADMB' ... ** R. **数据 *将数据集移动到lazyload DB ** inst **准备延迟装载包 警告:包裹' MASS'是在R版本3.4.4下构建的 ** 救命 * 安装帮助索引 **建立包装指数 **安装小插曲 **测试是否可以加载已安装的软件包 * arch - i386 错误:" tools :::。test_load_package中的意外符号(' glmmADMB',' C:/ Users / Vanessa' s" 执行停止 * arch - x64 错误:" tools :::。test_load_package中的意外符号(' glmmADMB',' C:/ Users / Vanessa' s" 执行停止 错误:' i386',' x64'
  • 的加载失败
  • 删除' C:/ Users / Vanessa的PC / Documents / R / win-library / 3.4 / glmmADMB' install.packages中的警告: 运行命令"" C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l" C:\ Users \ Vanessa' PC \ Documents \ R \ win-library \ 3.4" C:\ Users \用户VANESSA' S〜1个\应用程序数据\本地\ TEMP \ Rtmp2piXfe / downloaded_pa​​ckages / glmmADMB_0.8.3.3.tar.gz'有状态1 install.packages中的警告: 安装包'glmmADMB'具有非零退出状态

下载的源包在     'C:\ Users \ Vanessa&PC; AppData \ Local \ Temp \ Rtmp2piXfe \ downloaded_pa​​ckages'

2 个答案:

答案 0 :(得分:1)

首先尝试安装devtools软件包,然后直接从GitHub上的开发版本安装glmmADMB

> library(devtools)
> devtools::install_github("bbolker/glmmadmb")
Downloading GitHub repo bbolker/glmmadmb@master
from URL https://api.github.com/repos/bbolker/glmmadmb/zipball/master
Installing glmmADMB
Installing 1 package: R2admb
Installing package into ‘C:/Users/User/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 
'https://cran.rstudio.com/bin/windows/contrib/3.4/R2admb_0.7.16.zip'
Content type 'application/zip' length 505317 bytes (493 KB)
downloaded 493 KB

package ‘R2admb’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\User\AppData\Local\Temp\Rtmp4WWJZp\downloaded_packages
"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ 
--no-save -- no-restore --quiet CMD INSTALL  \
"C:/Users/User/AppData/Local/Temp/Rtmp4WWJZp/devtools28d0200a7e9b/bbolker- 
glmmadmb-ac75f73"  \
 --library="C:/Users/User/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'glmmADMB' ...
....

> library(glmmADMB)
Loading required package: MASS

Attaching package: ‘glmmADMB’

The following object is masked from ‘package:MASS’:

    stepAIC

The following object is masked from ‘package:stats’:

    step

答案 1 :(得分:0)

这有效:

install.packages("R2admb")

install.packages("glmmADMB", 
    repos=c("http://glmmadmb.r-forge.r-project.org/repos",
            getOption("repos")),
    type="source")

library(glmmADMB)