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"))
Run the code above in your browser using DataLab