[R] Encrypt/decrypt in R

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Mar 19 18:10:29 CET 2010

On Fri, Mar 19, 2010 at 5:00 PM, Hadley Wickham <hadley at rice.edu> 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.

 You could just include the numbers in a ROT13-sort of algorithm. It
would end up being ROT-18 I guess...

 Would a single permutation of c(letters,0:9) be sufficient? Or you
could add other characters. And what about non-ascii encodings?

 a bit of strsplit, match, paste magic should do it...


More information about the R-help mailing list