Learn R Programming

Tex4exams (version 0.1.2)

cm2l: Convert a matrix into a comma separated string.

Description

The output of cm2l is a vector of strings with length equal to the column size of the input matrix. The i-th entry is the string of the numbers from the i-th column of the matrix. For example, the 2 by 2 identity matrix is converted into c("1,0", "0,1").

Usage

cm2l(matrix)

Value

a vector of the strings of the columns of x. Each entry is a string of the column.

Arguments

matrix

a matrix.

See Also

m2l, m22l, rm2l, rcm2l

Examples

Run this code
a <- matrix(sample(c((-10):10),12),nrow =3,byrow=TRUE)
cm2l(a)

Run the code above in your browser using DataLab