Skip to contents

See ?.character_codes for conversion table. Note that this will not translate Ampersand if converting from Namedcode to character because it will translate the Namedcodes themselves.

Usage

character_codes(x, to_character = TRUE)

Arguments

x

chr string(s) in which character codes should be replaced

to_character

lgl Change character codes to character, if FALSE character symbols are changed to character codes

Value

chr with substitutions

Examples

character_codes("5 < 10")
#> [1] "5 < 10"
character_codes("5 &lt; 10")
#> [1] "5 < 10"
character_codes("5 &lt; 10", to_character = FALSE)
#> [1] "5 &lt; 10"