vec2mat2: Convert a vector of hyphenated names into a character matrix.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Convert a vector of hyphenated names into a character matrix with 2 columns containing the names split in each row.

Usage

1
vec2mat2(x, sep = "-")

Arguments

x

Vector of hyphenated names

sep

"strsplit" character to apply to names(x).

Details

If each element of x does not contain exactly 1 "sep" character, an error is issued.

Value

A character matrix with rownames = x and with the character string preceeding the "sep" character in the first column and the character string following the "sep" character in the second column.

Author(s)

Spencer Graves

See Also

vec2mat multcompLetters

Examples

1
2
3
4
5
vec2mat2(c("a-b", "a-c", "b-c"))

vec2mat2(c("a-b", "b-a"))

 

multcompView documentation built on Dec. 19, 2019, 5:06 p.m.