How to create a matrix from two given vectors in R in RStudio? Suppose, $c(1, 2, 3, 4)$ and $c(2, 4, 5, 6)$ are two vectors. Then in R or RStudio,


  How to create a $4\times 2$ matrix from these two vectors?


Also,


  how to add another vector $c(8, 9, 10, 11)$ as a column to the previous matrix?
x &lt;- c(1, 2, 3, 4)

y &lt;- c(2, 4, 5, 6)

z &lt;- matrix(c(x, y), nrow = length(x))

zz &lt;- cbind(z, c(8, 9, 10, 11))