I think I\'m looking for an analog of rbind.fill (in Hadley\'s plyr package) for cbind. I looked, but there is no cbind.fill
rbind.fill
plyr
cbind
cbind.fill
When a and b are data frames, following should work just fine:
a
b
ab <- merge(a, b, by="row.names", all=TRUE)[,-1]
or another possibility:
rows <- unique(c(rownames(a), rownames(b))) ab <- cbind(a[rows ,], b[rows ,])