In my dataframe I have column names with dashes and spaces e.g. address-type. When I try to export as .csv, the dashes and spaces change into dots, so "address-type" changes into address.type in the .csv file.
When importing .csvs I used check.names = FALSE, however, there doesn't seem to be a similar function when exporting.
Any help on this annoying problem would be greatly appriciated!
Edits to the question with example code:
df1 = data.frame("x 1" = 1, "x-2" = 2, check.names = F)
df2 = data.frame("y 1" = 1, "y-2" = 2, check.names = F)
Dflist <- list(df1, df2)
write.csv(Dflist[1],file="test.csv")