caesar {cipheR} | R Documentation |
Encrypt or decrypt a Caesar Cipher
Description
This can be used to create (encrypt) and solve (decrypt) a Caesar cipher. The function does not differentiate between the two.
The Caesar Cipher Wikipedia entry provides more information on the methods used: https://en.wikipedia.org/wiki/Caesar_cipher
Usage
caesar(x, n = 1, preserve_spaces = TRUE, dict = NULL, preset = NULL)
Arguments
x |
A vector to be shifted |
n |
(Default: |
preserve_spaces |
(Default: |
dict |
The dictionary used for shifting. This defaults to NULL in which case a dictionary is built from the sorted unique values of x. |
preset |
A pre-made dictionary using ASCII codes from
https://www.ascii-code.com/. Note that
|
Value
A character vector of length one that has been shifted.