I am creating a matrix using the matrix() but while creating the matrix the element are arranging according to column wise but I want it row wise

x<-matrix(1:6,nrow=2,ncol=3)

x

[,1] [,2] [,3]

[1,] 1 3 5

[2,] 2 4 6

I am getting this but I want 1 2 3 in first row and remaining in second row