is_ascii: Check if a character vector consists of entirely ASCII...

Description Usage Arguments Value Examples

View source: R/encoding.R

Description

Converts the encoding of a character vector to 'ascii', and check if the result is NA.

Usage

1

Arguments

x

A character vector.

Value

A logical vector indicating whether each element of the character vector is ASCII.

Examples

1
2
3
library(xfun)
is_ascii(letters)  # yes
is_ascii(intToUtf8(8212))  # no

yihui/xfun documentation built on Dec. 12, 2018, 10:49 p.m.