Hello! When I export a dataframe to a csv-file there is always an unwanted column added as the following demonstrates:
> system("cat example.csv") ID;Name;Value1;Value2 100;Tom;11,90;32,90 101;Martha;15,90;49,00 102;Ute;20,00;300,00 > write.csv2(read.csv2 ("example.csv"), "examplecopy.csv") > system("cat examplecopy.csv") "";"ID";"Name";"Value1";"Value2" "1";100;"Tom";11,9;32,9 "2";101;"Martha";15,9;49 "3";102;"Ute";20;300 > I never want the column "" "1" "2" "3" to be written into a csv-file. I could find any hint neither in the manual nor in the archive, but then I found the solution: row.names = FALSE > write.csv2(read.csv2 ("example.csv"), "examplecopy.csv", row.names = FALSE) > system("cat examplecopy.csv") "ID";"Name";"Value1";"Value2" 100;"Tom";11,9;32,9 101;"Martha";15,9;49 102;"Ute";20;300 But (perhaps because I am not a native in English) it was more a solution by trial and chance than by reading and understanding the manual. I did not expect this unwanted column to be called "row.names" (the values are numbers which at last becomes after a subset() completely unusuable in most cases). So I did never search for row names but for "unwanted column write." I did not dare to ask before because of the triviality of the question (even I stumble over this problem for weeks) but I want the next beginner who searches this list archive for "unwanted column" to get a result. Greetings Delcour ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.