Skip to content
Prev 313025 / 398503 Next

Import multiple data frames and combine them using "cbind"

On 05-12-2012, at 03:37, Gyanendra Pokharel wrote:

            
Slightly guessing what you want.
Toy example

set.seed(123)
mydf <- lapply(1:4,FUN=function(dname) data.frame(x=round(runif(10),2), y=round(runif(10),2),z=round(runif(10),2)))
mydf

do.call(cbind,lapply(mydf, function(df) df[,1:2]))


Berend