Learn R Programming

Tex4exams (version 0.1.2)

rcm2l: Converting a matrix into a comma separated string

Description

The output of rcm2l is a vector of strings with length equal to the row size of the input matrix. The i-th entry is the string of the numbers from the i-th row of the matrix. For example, the standard 2 by 2 Jordan block with 2 in the main diagonal is converted into c("2,1", "0,2").

Usage

rcm2l(matrix)

Value

a vector of strings with length equal to the row size of the input matrix. The i-th entry is the string of the numbers from the i-th row of the matrix.

Arguments

matrix

a matrix

See Also

m2l, m22l, rm2l, cm2l

Examples

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

Run the code above in your browser using DataLab