Conversion of character vector to integer vector. The encoding of the character vector can be specified but defaults to the current locale.

encToInt(x, encoding = localeToCharset())

Arguments

x

Character vector

encoding

A character string describing the encoding of x. Defaults to the current locale. See also iconvlist()

Value

An integer vector

Examples

encToInt("\xfa")
#> [1] NA