powered by
resize(x, nrow, ncol, ..., across = c("rows", "columns"), byrow = FALSE)
"rows"
"columns"
nrow
ncol
flatten
mat
matrix
m <- 1:9 resize(m) resize(m, 3, 3) resize(m, 2, 2)
Run the code above in your browser using DataLab