R/main.R
v2matrix.Rd
Convert a vector to a matrix
v2matrix(x, ncol = 2, byrow = TRUE)
vector
number of columns
logical. convert by row
a matrix
v2matrix(c(1,2,3,4)) #> x y #> [1,] 1 2 #> [2,] 3 4