powered by
Combining columns of a matrix
MatrixPaste(x, sep = "_", forceCharacter = FALSE, stringEmpty = " ")MatrixPaste1(x, stringEmpty = "1")
MatrixPaste1(x, stringEmpty = "1")
Character vector or possibly same vector as input
Matrix or vector
String used to combine columns
When FALSE single column input will keep to original class in output.
String used when input is empty (can be set to NULL)
Øyvind Langsrud
Each row in input will be combined to a single string using sep.
if (FALSE) { MatrixPaste(matrix(1:12,3,4)) MatrixPaste(1:5) MatrixPaste(1:5, forceCharacter=TRUE) MatrixPaste(matrix(integer(0),3,0)) MatrixPaste(NULL) }
Run the code above in your browser using DataLab