create matrix with function in r code example Example: matrix in r newMatrix = cbind(c(1,2,3),c(4,5,6))