-1

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? :

enter image description here

pogibas
  • 27,303
  • 19
  • 84
  • 117
John john
  • 437
  • 3
  • 13

1 Answers1

0

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
akrun
  • 874,273
  • 37
  • 540
  • 662