I'm trying to protect some datafiles I save in R. Is there a way to password protect an R datafile (.Rdata) ?
Thank you
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With