Description Usage Arguments Value See Also Examples
Simple conversion utilities for character to integer conversion and vice versa.
1 2 |
i |
integer vectors, typically in |
alpha |
character string with several letters, representing the alphabet. |
x |
character string, typically with letters from |
int2char()
gives a string (length 1 character) with as many
characters as length(i)
, by 0-indexing into the alphabet
alpha
.
char2int()
gives an integer vector of length nchar(x)
of integer codes according to alpha
(starting at 0 !).
int2alpha()
(which is used by int2char
)
and its inverse, int2alpha()
, both working with vectors
of single characters instead of multi-character strings.
1 2 3 4 |
[1] 21 11 12 2
[1] "abcddcb"
[1] "baNANA"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.