Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Password protect .rdata datafile

I'm trying to protect some datafiles I save in R. Is there a way to password protect an R datafile (.Rdata) ?

Thank you

like image 493
Tracy Avatar asked Jun 17 '16 20:06

Tracy


1 Answers

You can make a call to GnuPG for it to encrypt the file using public key cryptography after you create it in the same script. This would allow additionally for you to share the encrypted files with others without sharing your password.

More on GnuPG: https://www.gnupg.org/gph/en/manual.html

Though I would personally pipe shell commands to encrypt the file rather than using a third party tool/package, there is a gpg package on cran: https://cran.r-project.org/web/packages/gpg/index.html

like image 109
maerg Avatar answered Oct 21 '22 14:10

maerg