从github构建R包:如何禁用构建小插曲? [英] Building R package from github: how to disable building vignettes?

查看:227
本文介绍了从github构建R包:如何禁用构建小插曲?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从github构建 R包的分支(此分支具有 fresh bugfix )。不幸的是,编译失败的原因是当我尝试构建插件时,我的系统上错过了TeX。我不想安装大量的软件来创建我不需要的小插件。

 <$ c我该如何禁用构建它们? 

$ C>> require(devtools)
> install_github(patcpsc / rredis)
从patcpsc安装github repo rredis / master
从https://github.com/patcpsc/rredis/archive/master.zip下载master.zip
从C:\DOCUME〜1 \Tomas\LOCALS〜1 \Temp\Rtmpolel1d / master.zip安装软件包
安装rredis
安装rredis的依赖关系:
RUnit
---请选择一个CRAN镜像用于本次会议---
试用URL'http://www.freestatistics.org/cran/bin/windows/contrib/3.1/RUnit_0.4.26.zip '
内容类型'application / zip'长度194763字节(190 Kb)
已打开URL
已下载190 Kb

包'RUnit'已成功解压并检查了MD5总和

下载的二进制软件包位于
C:\ Documents and Settings \Tomas\Local Settings\Temp\Rtmpolel1d\downloaded_pa​​ckages
C:/ PROGRA 〜1 / R / R-31〜1.0 / bin / i386 / R-vanilla CMD buildC:\Documents and Settings\Tomas\Local \
Settings \Temp\Rtmpolel1d\devtools42062762938\rredis-master--no-manual --no-resave-data

*检查文件'C:\Documents和Settings\Tomas\Local Settings\Temp\Rtmpolel1d\devtools42062762938\rredis主/ DESCRIPTION ... OK
*准备 'rredis':
*检查描述元信息... OK
*清理src
*安装软件包以构建晕影
*创建晕影......警告:运行命令'C:/ PROGRA〜1 / R / R-31 〜'/ bin / i386 / Rscript--vanilla --default-packages = -etools :: buildVignettes(dir ='。',tangle = TRUE)'status is 1
ERROR
错误在texi2dvi中(file = file,pdf = TRUE,clean = clean,quiet = quiet,:
pdflatex不可用
调用:< Anonymous> - > texi2pdf - > texi2dvi
执行暂停
错误:命令失败(1)

解决方案

哇,找到它了!我错过了它,因为它没有在 install_github 函数的选项中列出,但它接受 install 的所有其他选项,并且 build 函数!

  install_github(patcpsc / rredis,build_vignettes = FALSE)


I try to build fork of R package from github (this fork has a fresh bugfix). Unfortunatelly, the compilation fails on TeX being missed on my system when trying to build vignettes. I don't want to install loads of SW just to build vignettes I don't need. How can I disable building them?

This is how my compilation went:

> require(devtools)
> install_github("patcpsc/rredis")
Installing github repo rredis/master from patcpsc
Downloading master.zip from https://github.com/patcpsc/rredis/archive/master.zip
Installing package from C:\DOCUME~1\Tomas\LOCALS~1\Temp\Rtmpolel1d/master.zip
Installing rredis
Installing dependencies for rredis:
RUnit
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://www.freestatistics.org/cran/bin/windows/contrib/3.1/RUnit_0.4.26.zip'
Content type 'application/zip' length 194763 bytes (190 Kb)
opened URL
downloaded 190 Kb

package ‘RUnit’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Documents and Settings\Tomas\Local Settings\Temp\Rtmpolel1d\downloaded_packages
"C:/PROGRA~1/R/R-31~1.0/bin/i386/R" --vanilla CMD build "C:\Documents and Settings\Tomas\Local  \
  Settings\Temp\Rtmpolel1d\devtools42062762938\rredis-master" --no-manual --no-resave-data 

* checking for file 'C:\Documents and Settings\Tomas\Local Settings\Temp\Rtmpolel1d\devtools42062762938\rredis-master/DESCRIPTION' ... OK
* preparing 'rredis':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-31~1.0/bin/i386/Rscript" --vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1
 ERROR
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  pdflatex is not available
Calls: <Anonymous> -> texi2pdf -> texi2dvi
Execution halted
Error: Command failed (1) 

Thanks in advance.

解决方案

Wow, found it! I missed it as it is not listed in options of install_github function, but it accepts all the other options of install and build functions!

install_github("patcpsc/rredis", build_vignettes = FALSE)

这篇关于从github构建R包:如何禁用构建小插曲?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆