Skip to content

renkun-ken/secret

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secret

Make Secret Functions in package

To hide the source code of R functions in package, take the following steps:

  1. Call devtools::use_rcpp() to initiate using Rcpp in package.

  2. Call secret::use_secret() to initiate using secret in package.

  3. Write anonymous functions in ./secret.

    For example, create ./secret/test.R:

    function(x) {
      x + 100
    }
  4. Call secret::build_secret() which converts all R scripts in ./secret to corresponding C++ source files in ./src. In the example, ./secret/test.R is converted to ./src/test.cpp.

  5. Build and distribute the package in binary format.

About

Make Secret Functions in Package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages