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
While, I think Tyler's solution is direct and the best here, I just provide the other way, using rbind.fill()
that we already have.
require(plyr) # requires plyr for rbind.fill()
cbind.fill <- function(...) {
transpoted <- lapply(list(...),t)
transpoted_dataframe <- lapply(transpoted, as.data.frame)
return (data.frame(t(rbind.fill(transpoted_dataframe))))
}