I am new to R and have a folder containing ~300 .csv files. I am trying to merge all the data into one file so that I can carry out some basic arithmetic on it. I have tried searching the web however the function I have tried keep bringing me errors eg
master <- list.files(path = "~/")
master <- do.call("rbind", lapply("001.csv" "002.csv", read.csv, header = TRUE))
gives back Error: unexpected string constant in ""329.csv" "330.csv""
etc
and the following
master <- do.call( rbind, lapply(`001.csv`,`002.csv` function(nam){
cbind(name=nam, read.file(paste0(nam,".csv"), header=TRUE) )
}))
gives Error: unexpected '}' in "}"
Would anyone be able to help? If so could you please explain so that someone who is new to programming will be able to follow.
Thank you