Re: [R] loading data frames and rbind them

2013-03-13 Thread A M Lavezzi
Dear Ivan and Greg, thaks a lot! sorry for late reply, both ways work fine! I have to say that maybe Greg's is a little faster (but I am working with a relatively small amount of data, approx 130 xls files) so I do not notice remarkable differences. The only suggestion I have is to add to the rea

Re: [R] loading data frames and rbind them

2013-03-12 Thread Greg Snow
The only real improveent I can see over Ivan's solution is to use lapply instead of the loop (this may just be person preference though). Something like: list_df <- lapply( lista_rea_c, function(x) read.xls( file= paste0(path,x,"/",x,".xls"),1,header=TRUE,as.data.frame=TRUE)) my_df <- do.call(rbi

Re: [R] loading data frames and rbind them

2013-03-12 Thread Ivan Calandra
Hi Mario! I'm not really familiar with this kind of manipulations, but I think you can do it more or less like this (some people on this list might give a more detailed answer): #Create an empty named list list_df <- vector(mode="list", length=length(lista_rec_c)) names(list_df) <- lista_rea_

[R] loading data frames and rbind them

2013-03-12 Thread A M Lavezzi
Hello everybody I have the following problem. I have to load a number of xls files from different folders (each xls file has the same number of columns, and different numbers of rows). Each xls file is named with a number, i.e. 12345.xls and is contained in a folder with same name, say 12345) Onc