latinize {photon} | R Documentation |
Latinization
Description
Helper tool to transliterate various encodings to latin. Attempts to
convert a character vector from its current encoding to "latin1"
and -
if it fails - defaults back to the original term. This can be useful
for geocode
and structured
when attempting to
geocode terms containing symbols that photon does not support.
Usage
latinize(x, encoding = "latin1")
Arguments
x |
A character vector. |
encoding |
Encoding that the strings in |
Value
The transliterated vector of the same length as x
. NA
s
are avoided.
Examples
# converts fancy apostrophes to normal ones
latinize("Luatuanu\u2019u")
# does nothing
latinize("Berlin")
# also does nothing, although it would fail with `iconv`
latinize("\u0391\u03b8\u03ae\u03bd\u03b1")
[Package photon version 0.3.5 Index]