powered by
Character vector to matrix
chr_to_matrix(x, value = 0)
character vector
value in matrix
creates square matrix with x as row and column names and val as values
x
val
d1 <- letters[1:3] chr_to_matrix(d1, 3:5)
Run the code above in your browser using DataLab