0

Is it possible to create an R package such that if I give it to a user, they could run all the functions within the package, but not be able to view any of the source code?

The two possible ways I can think of would be someone opening up the raw .R files within the package, or by typing the function name in the R console to print the R code text. So is there a way to encrypt the files or disable the function print calls for the functions?

Thanks

Nate Thompson
  • 625
  • 1
  • 7
  • 22
  • This would be a violation at least in spirit of the Open Source licensing of R. I suspect it would also be legally actionable in some jurisdictions. – IRTFM Jan 02 '18 at 18:31

1 Answers1

3

Luckily, there is no such functionality. If you want to hide your analysis or algorithm, perhaps you could use some proprietary software or write your code in a language which compiles (e.g. C++). Note that all software is reverse-engineerable. It's just a matter of motivation.

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197