View source: R/encode_decode.R
encode | R Documentation |
Encode a Vector of Character
encode(x, level = 1, chars = printable_chars(level))
x |
vector of character |
level |
one of 1, 2, or 3 defining which character set to use for
encoding, see |
chars |
vector of characters to be used for encoding |
vector of character as long as x
with each element containing
the encoded version of the corresponding element in x
. The returned
vector has an attribute codes
being a named vector. This vector
contains the unique values in x
as elements. Each element is named
by the code that was used to encode the corresponding element.
x <- c("very-long-word", "very-long-word", "very-very-long-word")
encoded <- encode(x)
encoded
decode(encoded)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.