I've created a script which goes through set directory and merge all Excel files into one csv
everything is fine but I got one additional column with the header of
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
and NA values
How to get rid of that? I mean, ideally how to make that it never appears rather than delete it afterwards
My code is simple
fulldata <- dir("path", full.names = T) %>% map_df(read.csv)
write.table(fulldata, file = "path/Merge.csv", sep = ",", col.names = T, row.names = F, quote = F)
Additional questions:
Can I do that all in xlsx instead of csv? I've tried read.xlsx from openxlsx library however it didnt worked out, I had error in this line
fulldata <- dir("path", full.names = T) %>% map_df(read.xlsx)