[R] Werid things when write.table
Damian Abalo
wardamo.zero at gmail.com
Wed Sep 7 10:10:37 CEST 2011
Hello, I am having some issues with the order write.table.
The fact is that I need to use "," as the decimal character and not
"." as default, and when I use:
write.table(Sales,file="Sales.xls",quote=FALSE, sep = "\t", dec = ",",
row.names = FALSE, col.names = TRUE)
It does it perfectly, but then, in a different part of the code:
write.table(Error,file="Error report.xls",quote=FALSE, sep = "\t", dec
= ",", row.names = FALSE, col.names = TRUE)
It does not do it, it keeps the . as the decimal character. The main
difference is that the second table is treated as a character matrix,
because it has characters on the first line, which work as titles.
This table is builded by cbinding several quantile orders, and I don't
know how to make the program treat the table as numbers while
mantaining the titles (Since it is not a table really). Any ideas?
Thanks for your help
More information about the R-help
mailing list