powered by
Insert a new column into a matrix.
insertCol( m, c, v = NA, cName = "" )
a matrix with one more column than the provided matrix m.
m
matrix.
column number where the new column should be inserted.
optional values of the new column.
optional character string: the name of the new column.
Arne Henningsen
insertRow.
insertRow
m <- matrix( 1:4, 2 ) insertCol( m, 2, 5:6 )
Run the code above in your browser using DataLab