| invert_rules | R Documentation |
invert_rules allows decoding messages that were
encoded by a set of rules x.
invert_rules(x)
x |
The rules used for encoding a message (as a named vector). |
x is assumed to be a named vector.
invert_rules replaces the elements of x
by the names of x, and vice versa.
A message is issued if the elements of x are repeated
(i.e., decoding is non-unique).
A character vector.
transl33t for encoding text (e.g., into leet slang);
l33t_rul35 for default rules used.
Other text objects and functions:
Umlaut,
capitalize(),
caseflip(),
cclass,
chars_to_text(),
collapse_chars(),
count_chars_words(),
count_chars(),
count_words(),
l33t_rul35,
map_text_chars(),
map_text_coord(),
map_text_regex(),
metachar,
read_ascii(),
text_to_chars(),
text_to_sentences(),
text_to_words(),
transl33t(),
words_to_text()
invert_rules(l33t_rul35) # Note repeated elements
# Encoding and decoding a message:
(txt_0 <- "Hello world! How are you doing today?") # message
(txt_1 <- transl33t(txt_0, rules = l33t_rul35)) # encoding
(txt_2 <- transl33t(txt_1, rules = invert_rules(l33t_rul35))) # decoding
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.