Description Usage Arguments Details Value Examples
View source: R/f1.rbsb2.code.r
from a character
vector, returns a vector, or a matrix, or an
array of characters with possibly names, or dimames. The information
can be supplied in different ways for each of the three
possibilities. It is advised to try the proposed examples.
1 |
cha |
The character to transform. |
what |
Indicates which structure to return: either a vector, a
matrix or an array. |
xsep |
Character sequence used to separate the character vector into blocks giving information about the structure (see the examples). |
nat |
Nature of the returned structure. Can be |
The processing is done in character mode but the result can be
transformed into numerical or logical values with the help of
argument nat
.
In fact rbsb.vma
coding is used for
the argument what
. This allows to easily modify the coding.
a vector or a matrix or an array according to the inputs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | rbsb3k("reset"); # For R checking convenience
char2vma(letters, "c");
char2vma(letters, "C", xsep="e");
char2vma(letters);
char2vma(letters, "V");
char2vma(letters, "u");
char2vma(c(LETTERS, letters), rbsb.vma["V"]);
char2vma(c("A", "a", "B", "b", "C", "c"), rbsb.vma["U"]);
char2vma(c(1:3, "//", 4:6), rbsb.vma["m"]);
char2vma(c(1:3, "//", 4:6), rbsb.vma["M"]);
char2vma(c(LETTERS[1:3], "//", 1:3, "//", 4:6), rbsb.vma["n"]);
char2vma(c(LETTERS[1:3], "//", 1:3, "//", 4:6), "N");
char2vma(c("a", 1:3, "//", "b", 4:6), "o");
char2vma(c(c(LETTERS[1:3], "//", "a", 1:3, "//", "b", 4:6)), rbsb.vma["p"]);
char2vma(c(2:4, "//", 1:24), "a");
char2vma(c(2:4, "//", "one", "two", "//", LETTERS[1:3], "//",
letters[1:4], "//", 1:24), "A");
char2vma(c(2:4, "//", "one", "two", "//", LETTERS[1:3], "//",
letters[1:4], "//", 1:24), "A", nat="N");
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.