[R] Sourcing encrypted files
mark at wardle.org
Tue Sep 18 10:13:50 CEST 2007
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.
On 17/09/2007, Dennis Fisher <fisher at plessthan.com> wrote:
> 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
> 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.
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone: 1-866-PLessThan (1-866-753-7784)
> Fax: 1-415-564-2220
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> 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
More information about the R-help