[R] Protecting R code

Duncan Murdoch murdoch.duncan at gmail.com
Tue Jul 5 05:15:48 CEST 2011

On 11-07-04 3:47 AM, Vaishali Sadaphal wrote:
> Hi All,
> I need to give my R code to my client to use. I would like to protect the
> logic/algorithms that have been coded in R. This means that I would not
> like anyone to be able to read the code.

R is an open source project, so providing ways for you to do this is not 
one of our goals.

If I were your client I would have asked for the source code for 
whatever you're doing; if your client isn't savvy enough to do that, you 
should provide it and explain why it is useful, and what your client is 
and isn't allowed to do with it.

If you think your client will steal from you, then you should find 
another client.

Duncan Murdoch

> I am searching for ways to protect R code. I would like to create a .exe
> kind of file which could be executed without using R or requiring to
> install R. I would not like the R code to be loaded in R. This is so
> because, after R loads a function, if you type the function name on the
> command prompt, you can see the complete code. I would not like to give
> this type of access to the R code.
> I explored the option of creating .bat file (using command: R CMD BAT) and
> byte code (using command: compile). These are not useful since they open
> R, load these functions and then the R code is visible.
> Is there any other way to protect the R code which would help me package
> all my files/source files and give me an executable file which would be
> run without opening R? Another problem is that R is freely downloadable.
> Is it somehow possible to protect the code from being loaded in R and
> being seen.
> Thanks
> --
> Vaishali
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list