Append multiple csv files into one file using R

前端 未结 4 1403
[愿得一人]
[愿得一人] 2020-12-20 06:54

I Have multiple csv files that i have already read into R. Now I want to append all these into one file. I tried few things but getting different errors. Can anyone please h

4条回答
  •  [愿得一人]
    2020-12-20 07:43

    The accepted answer above generates the error shown in the comments because the do.call requires the "fullpath" parameter. Use the code as shown to use in the directory of your choice:

    dataset <- do.call("rbind",lapply(fullpath,FUN=function(files){ read.csv(files)}))
    

提交回复
热议问题