简体   繁体   English

我可以用字节码编译我的R包吗?

[英]Can I compile my R package in bytecode?

Can I compile my R package in bytecode? 我可以用字节码编译我的R包吗? I have an R package and I want to compile it with 我有一个R包,我想用它编译

R CMD INSTALL --build mypackage.tar.gz 

but I want the R code to be compiled into bytecode. 但我希望将R代码编译成字节码。 Is this possible in R 2.14.0? 这在R 2.14.0中是否可行?

Yes, this is listed in the NEWS for R 2.14 and in the R extensions manual. 是的,这在R 2.14的新闻和R扩展手册中列出。

NEWS: 新闻:

R CMD INSTALL has a new option --byte-compile to byte-compile the packages during installation (since all packages are now lazy-loaded). R CMD INSTALL有一个新选项--byte-compile在安装过程中对包进行字节编译(因为所有包现在都是延迟加载的)。 This can be controlled on a per-package basis by the optional field ByteCompile in the DESCRIPTION file. 这可以通过DESCRIPTION文件中的可选字段ByteCompile在每个包的基础上进行控制。

The ByteCompile field is described in section 1.1.1 of the "Writing R Extensions" manual for the DESCRIPTION file. ByteCompile字段在DESCRIPTION文件的“Writing R Extensions”手册的1.1.1节中描述。

The manuals on CRAN are still 2.13.2 so I looked in the installed version of the extensions manual for that. CRAN上的手册仍然是2.13.2,所以我查看了已安装的扩展手册版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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