简体   繁体   中英

Can I compile my R package in bytecode?

Can I compile my R package in bytecode? I have an R package and I want to compile it with

R CMD INSTALL --build mypackage.tar.gz 

but I want the R code to be compiled into bytecode. Is this possible in R 2.14.0?

Yes, this is listed in the NEWS for R 2.14 and in the R extensions manual.

NEWS:

R CMD INSTALL has a new option --byte-compile to byte-compile the packages during installation (since all packages are now lazy-loaded). This can be controlled on a per-package basis by the optional field ByteCompile in the DESCRIPTION file.

The ByteCompile field is described in section 1.1.1 of the "Writing R Extensions" manual for the DESCRIPTION file.

The manuals on CRAN are still 2.13.2 so I looked in the installed version of the extensions manual for that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM