x <- set_units(1, m/s)
y <- set_units(1:3, m/s)
z <- set_units(8:10, m/s)
(m <- cbind(x, y)) # the '1' (= shorter vector) is recycled
(m <- cbind(m, z)[, c(1, 3, 2)]) # insert a column
(m <- rbind(m, z)) # insert a row
Run the code above in your browser using DataLab