encToInt: Converts a character vector to an integer vector.

View source: R/encoding.R

encToIntR Documentation

Converts a character vector to an integer vector.

Description

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

Usage

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

See Also

iconv()

Other Functions to clean data: fix_common_encoding_problems(), fix_levels_01_spss(), has_dont_know(), intToEnc(), leveltest, remove_all_dont_know(), remove_dont_know()

Examples

encToInt("\xfa")

andrie/surveydata documentation built on March 13, 2023, 2 a.m.