AsciiToInt returns integer codes in 0:255
for each (one byte) character in strings. ichar is an
alias for it, for old S compatibility.
strcodes implements in R the basic engine for translating
characters to corresponding integer codes.
chars8bit() is the inverse function of
AsciiToint, producing “one byte” characters from integer
codes. Note that it (and hence strcodes() depends on the
locale, see Sys.getlocale().
AsciiToInt(strings)
ichar(strings)
chars8bit(i = 1:255)
strcodes(x, table = chars8bit(1:255))AsciiToInt (and hence ichar) and chars8bit return a
vector of the same length as their argument.
strcodes(x, tab) returns a list of the same
length and names as x with list
components of integer vectors with codes in 1:255.
character vector.
numeric (integer) vector of values in 1:255.
a vector of (unique) character strings, typically of one character each.
Martin Maechler, partly in 1991 for S-plus
Only codes in 1:127 make up the ASCII encoding which should be
identical for all R versions, whereas the ‘upper’ half
is often determined from the ISO-8859-1 (aka “ISO-Latin 1)”
encoding, but may well differ, depending on the locale setting, see
also Sys.setlocale.
Note that 0 is no longer allowed since, R does not allow
\0 aka nul characters in a string anymore.