intToChar

0th

Percentile

Converts a vector of integers into a vector of ASCII characters

Converts a vector of ASCII integers to a equal length vector of ASCII characters. To make sure that all values in the input vector are in the range [0,255], the input vector is taken modulo 256.

Keywords
internal, character
Usage
# S3 method for default
intToChar(i, ...)
Arguments
i

An integer vector.

...

Not used.

Value

Returns an ASCII character vector.

See Also

utf8Conversion. charToInt()

Aliases
  • intToChar.default
  • intToChar
Examples
# NOT RUN {
  i <- charToInt(unlist(strsplit("Hello world!", split=NULL)))
  # Gives: 72 101 108 108 111  32 119 111 114 108 100  33
  ch <- intToChar(c(72,101,108,108,111,32,119,111,114,108,100,33))
  # Gives: "H" "e" "l" "l" "o" " " "w" "o" "r" "l" "d" "!"
# }
Documentation reproduced from package R.oo, version 1.22.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.