
Last chance! 50% off unlimited learning
Sale ends in
Converts the encoding of a character vector to 'ascii'
, and check if
the result is NA
.
is_ascii(x)
A character vector.
A logical vector indicating whether each element of the character vector is ASCII.
# NOT RUN {
library(xfun)
is_ascii(letters) # yes
is_ascii(intToUtf8(8212)) # no
# }
Run the code above in your browser using DataLab