Skip to content
Prev 311403 / 398513 Next

data after write() is off by 1 ?

On 20/11/2012 2:30 PM, Brian Feeny wrote:
You have a factor, not numerical data.  Apparently write() is writing 
out the factor values (index into the levels) rather than their string 
representation.  (I've never used write().  Normally would use cat() or 
write.csv() or something related to write data
to a file for reading outside of R. )  write.csv() will write out the 
strings, by default in quotes, but there are lots of arguments
to control the formatting.

Duncan Murdoch