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

时间:2023-01-18 07:39:34

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?

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

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.

提前致谢。

1 个解决方案

#1


9  

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函数的选项中列出,但它接受安装和构建函数的所有其他选项!

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

#1


9  

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函数的选项中列出,但它接受安装和构建函数的所有其他选项!

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