vec2mat2 | R Documentation |
Convert a vector of hyphenated names into a character matrix with 2 columns containing the names split in each row.
vec2mat2(x, sep = "-")
x |
Vector of hyphenated names |
sep |
"strsplit" character to apply to names(x). |
If each element of x does not contain exactly 1 "sep" character, an error is issued.
A character matrix with rownames = x and with the character string preceding the "sep" character in the first column and the character string following the "sep" character in the second column.
Spencer Graves
vec2mat
multcompLetters
vec2mat2(c("a-b", "a-c", "b-c"))
vec2mat2(c("a-b", "b-a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.