my data are :
a
[,1]
[1,] 1
[2,] 2
[3,] 3
[4,] 4
[5,] 5
and :
b
[,1]
[1,] 7
[2,] 8
[3,] 9
[4,] 10
[5,] 11
[6,] 12
How can we get this? :
One option is cbind.fill
setNames(rowr::cbind.fill(a, b, fill = NA), c("a", "b"))
# a b
#1 1 7
#2 2 8
#3 3 9
#4 4 10
#5 5 11
#6 NA 12