Mayank Bansal
Mayank Bansal

Reputation: 1125

Converting R code into bytecode

I am trying to make a package in R, which is solely a R code, without the use of any external language. Now, I read that converting the package into the byte code would give me significant speed improvements, this can be done during the package installation by specifying <R CMD INSTALL --byte-code>

I was wondering if there is an option through i which I could pre compile the R codes into bytecode and do a R CMD INSTALL of the compiled bytecode package instead of asking the user to write <R CMD INSTALL --byte-code>

Is there a way to get the package to be build in bytecode only?

Upvotes: 2

Views: 1023

Answers (1)

Fhnuzoag
Fhnuzoag

Reputation: 3920

Yes. In your DESCRIPTION file, specify:

ByteCompile: yes

Then your package will be automatically byte compiled by default if the capability exists.

Upvotes: 6

Related Questions