merging multiple csv files in R using do.call

前端 未结 2 1478
一向
一向 2021-02-13 20:01

I am trying to import and merge a set of csv files using the following code, but it doesn\'t seem to be passing the by=c(\"X\",\"Y\") argument to the merge function. Any recomme

2条回答
  •  梦如初夏
    2021-02-13 20:40

    do.call accepts a list of all arguments, so try:

    my.df <- do.call("merge",append(lapply(csvfiles, read.csv, header = TRUE), list(by=c("date","fx_code")) )
    

提交回复
热议问题