Learn R Programming

doBy (version 4.6.22)

chr_to_matrix: Character vector to matrix

Description

Character vector to matrix

Usage

chr_to_matrix(x, value = 0)

Arguments

x

character vector

value

value in matrix

Details

creates square matrix with x as row and column names and val as values

Examples

Run this code

d1 <- letters[1:3]
chr_to_matrix(d1, 3:5)

Run the code above in your browser using DataLab