Learn R Programming

ciphertext (version 0.1.1)

polybius: polybius

Description

The polybius square is a device which associates each letter to a pair of coordinates. The letter J is excluded and replaced with I in order to get 25 letters and create a 5x5 matrix.

Usage

polybius(input, encrypt = TRUE)

Value

a string

Arguments

input

Word or phrase to be encrypted, or character vector with the sequence of coordinate numbers if we need to decrypt

encrypt

If `TRUE` (default), the program ciphers the input word, If `FALSE`, the program decrypts it.

References

https://en.wikipedia.org/wiki/Polybius_square

Examples

Run this code
polybius("hello world")
polybius("23 15 31 31 34 52 34 42 31 14", encrypt = TRUE)

Run the code above in your browser using DataLab