I have several chunks of data in csv format and I want to import them and merge them together to create a whole new csv file. however, when I try to do so, I get the following error:
Error in read.table(file = file, header = header, sep = sep, quote = quote, : no lines available in input
Below is the code that I use:
for (x in 1:50){
print(x)
chunks[[x]]<-mutate_geocode(chunks[[x]], location = full_address, output = "latlona")
write.csv(chunks[[x]],paste0("~/120Water Dropbox/LSLI Clients/IN/Anderson/02 - R/Data/billing_chunks_KE",x,".csv"), row.names = FALSE)
}
files<-list.files(path = "~/120Water Dropbox/LSLI Clients/IN/Anderson/02 - R/Data", pattern = "billing_chunks_KE", full.names = T)
customer_billing_full<-do.call(rbind,lapply(files,read.csv))
write.csv(customer_billing_full,"~/120Water Dropbox/LSLI Clients/IN/Anderson/02 - R/Data/Customer Billing_full.csv", row.names = FALSE)
I appreciate any help.
[<-.factor
(*tmp*
, ri, value = c(NA, NA, NA, NA, NA, NA, NA, : invalid factor level, NA generated – Kaveh Ekbia