Skip to content
Prev 4697 / 63421 Next

write.table

On Wed, 6 Dec 2000, Torsten Hothorn wrote:

            
Yes.  write.table converts to a data frame. Try

x <- data.frame(m, check.names=FALSE)
write.table(x)

to give it a data frame in the first place.  The help says:

       x: the object to be written, typically a data frame.  If not, it
          is attempted to create one from it.

and the names get converted during that process to valid names.