Skip to content

Instantly share code, notes, and snippets.

@abelsonlive
Created November 19, 2012 18:12
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save abelsonlive/4112423 to your computer and use it in GitHub Desktop.
Save abelsonlive/4112423 to your computer and use it in GitHub Desktop.
cbind.fill.R
# yay!
cbind.fill<-function(...){
nm <- list(...)
nm<-lapply(nm, as.matrix)
n <- max(sapply(nm, nrow))
do.call(cbind, lapply(nm, function (x)
rbind(x, matrix(, n-nrow(x), ncol(x)))))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment