I have about 100 csv files with common headers that I want to combine. The headings are βLat,β βLong,β and βvalue.β I am trying to merge all csv files in such a way that the output will be
"Lat" "Lon" "Value1" "Value2"..."Value 100"
Columns
Lat and Lon identical for all csv files. Merging two files is easy
merge(data.frame1, data.frame2, by=c('Lat','Lon'))
However, I tried the following code that did not work:
file_list <- list.files(~/source) list_of_files <- lapply(file_list, read.csv) m1 <- merge_all(list_of_files, by=c("Lat","Lon"), all=TRUE)
which gives an error
Error in merge.data.frame(dfs[[1]], Recall(dfs[-1]), all = TRUE, sort = FALSE, : formal argument "all" matched by multiple actual arguments.
Can anyone help me in this regard.
Navin source share