Hi everyone, I want to write some data to file, for example
a = c(1,2,3,4,5) b = c(5,6,7,8,9) write.table(cbind(a,b), file = "R output.csv", sep = ",") The result is this: a b 1 1 5 2 2 6 3 3 7 4 4 8 5 5 9 It added an index and shifted the column names by one, b is above a, and a is above the added index. Does anybody know a way to prevent this shift from happening? Thanks in advance. Kind regards, Dennis -- View this message in context: http://www.nabble.com/write.table-column-names-shift-tp25289490p25289490.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org 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.