I would like two vectors with unequal lengths to be combined but rbind() returns like
a <- 1:5
b <- 1:10
rbind(a,b)
# [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
# a 1 2 3 4 5 1 2 3 4 5
# b 1 2 3 4 5 6 7 8 9 10
but I would like my data to be
rbind(a,b)
# [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
# a 1 2 3 4 5 0 0 0 0 0
# b 1 2 3 4 5 6 7 8 9 10
and make a layered histogram with one layer