[R] Encrypt/decrypt in R

Marc Schwartz marc_schwartz at me.com
Fri Mar 19 18:26:37 CET 2010


On Mar 19, 2010, at 12:00 PM, Hadley Wickham wrote:

> Hi all,
> 
> Does any one know of any encryption/decryption algorithms in R?  I'm
> not looking for anything robust - I want some way of printing output
> to the screen that the user can't read immediately, but can decrypt a
> little later.  The main thing I don't want to the user to see is a
> number, so (e.g.) ROT13 isn't appropriate.
> 
> Hadley

I don't know of anything offhand in R and anything beyond very simple stuff would be rather slow in an interpreted language. You can always create character translations and such using functions such as chartr().

There is GnuPG (http://www.gnupg.org), which provides a broad range of algorithms via a CLI interface, which can be called via system().

HTH,

Marc Schwartz



More information about the R-help mailing list