Skip to content
Prev 366497 / 398502 Next

About populating a dataframe in a loop

Hello,

I believe you should follow Jeremiah's sugestion to first read all csv 
files into a list and then rbind them.
Something like the following.

file_list <- list.files(pattern = "*.csv")
df_list <- lapply(file_list, read.csv)
result <- do.call(rbind, df_list)

Hope this helps,

Rui Barradas

Em 07-01-2017 06:51, lily li escreveu: