从github构建R包:如何禁用构建小插图?

时间:2014-09-13 08:48:47

标签: r github

我尝试从github构建fork of R package(此fork有一个fresh bugfix)。不幸的是,在尝试构建小插图时,我的系统上的TeX被错过了编译失败。我不想安装SW的负载只是为了构建我不需要的插图。如何禁用构建它们?

这就是我编译的方式:

> 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) 

提前致谢。

1 个答案:

答案 0 :(得分:9)

哇,找到了!我错过了它,因为它未列在install_github函数的选项中,但它接受installbuild函数的所有其他选项!

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