matrixPaste {odfWeave} | R Documentation |
For a series of character matrices with the same dimensions, paste each element together in the order specified.
matrixPaste(..., sep = rep(" ", length(list(...)) - 1))
... |
a set of |
sep |
a vector of |
The matrices are converted to vectors and pasted, then re-dimensioned. Different separators can be used between matrices, but the same separator must be used for all of the elements.
a character matrix
Max Kuhn
mat1 <- matrix(letters[1:6], nrow = 2) mat2 <- matrix(LETTERS[1:6], nrow = 2) mat3 <- matrix(paste(1:6), nrow = 2) matrixPaste(mat1, mat2) matrixPaste(mat1, mat2, sep = "+") matrixPaste(mat1, mat2, mat3, sep = c("+", "plus"))