Description Usage Arguments Value See Also Examples
Simple conversion functions for discrete data (e.g., time series),
between 0:k
integers and single letter characters.
1 2 |
x |
character vector of single letters. |
alpha |
the alphabet, as one character string. |
i |
integer vector of numbers in |
alpha2int(x,*)
returns an integer
vector of the same
length as x
, consisting of values from 0:k
where
k + 1
is the length of the alphabet, nchar(alpha)
.
int2alpha(i,*)
returns a vector of single letter
character
of the same length as i
.
vlmc
, and
int2char()
and its inverse, char2int()
,
both working with multi-character strings instead of vectors of single
characters; further, alphabet
.
1 2 3 4 |
[1] "g" "b" "d" "i" "a" "e" "g" "j" "e" "f" "c" "a" "c" "c" "j" "c" "d" "g" "a"
[20] "g" "g" "g" "h" "a" "a" "f" "h" "j" "e" "i"
[1] 6 1 3 8 0 4 6 9 4 5 2 0 2 2 9 2 3 6 0 6 6 6 7 0 0 5 7 9 4 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.