[R] Sourcing encrypted files

Mark Wardle mark at wardle.org
Tue Sep 18 10:13:50 CEST 2007

Dear Dennis,

Ignoring the reasons why you might want to do this, you may want to
explore a ram disk. I don't know which OS you are using, but assume a
unix or unix-like OS, there may be a straightforward way to mount a
ram-based volatile disk and decrypt your file to there.

Another option would be to use an encrypted partition.

Best wishes,


On 17/09/2007, Dennis Fisher <fisher at plessthan.com> wrote:
> Colleagues,
> I have an unusual problem; I am wondering whether anyone has dealt
> with it and found a solution.
> I have a script that needs to be encrypted.  R will then be run on
> the script.  There are various means to decrypt the file, some of
> which leave the decrypted code on the hard drive for an excessive
> period.
> One means that I have considered to deal with this is the following
> (the unix code is not correct, just sufficient to communicate the idea):
>         system("decrypt ...")
>         system("rm encrypted file")
>         source(decrypted file)
>         system("rm decrypted file")
> Another approach would be to pipe the decrypted version to R in the
> command line (as it is being decrypted).  Obviously, this could be
> done with R < decryptedFile but this leaves the decrypted code
> exposed.  Is there some other means to accomplish my goals using
> something on the command line?
> Of note, the scripts are not terribly long - 50-200 lines each.
> Thanks
> Dennis
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-415-564-2220
> www.PLessThan.com
>         [[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.
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________

Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK

More information about the R-help mailing list