[R] Werid things when write.table

2011-09-07 Thread Damian Abalo
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

Re: [R] Werid things when write.table

2011-09-07 Thread jim holtman
If your matrix is being converted to characters, then the conversion (and the use of '.' for decimal) is happening before the the write.table call. Do the cbinding without putting titles (characters) in the first line and then once the table is build, use 'colnames' to add the titles. It sounds

Re: [R] Werid things when write.table

2011-09-07 Thread Damian Abalo
It works now. It is much more appropiate to add the titles than to add a column with strings, and, in fact, it were rownames, not column names (thats why colnames was set to true). Anyway using rownames instead of adding an aditional column and setting row.names to true in the write.trable works