is_ascii {xfun} | R Documentation |
Check if a character vector consists of entirely ASCII characters
Description
Converts the encoding of a character vector to 'ascii'
, and check if
the result is NA
.
Usage
is_ascii(x)
Arguments
x |
A character vector. |
Value
A logical vector indicating whether each element of the character vector is ASCII.
Examples
library(xfun)
is_ascii(letters) # yes
is_ascii(intToUtf8(8212)) # no
[Package xfun version 0.46 Index]