Check if a character vector consists of entirely ASCII characters
Converts the encoding of a character vector to 'ascii'
, and check if
the result is NA
.
is_ascii(x)
x |
A character vector. |
A logical vector indicating whether each element of the character vector is ASCII.
library(xfun) is_ascii(letters) # yes is_ascii(intToUtf8(8212)) # no
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.