RE: [R] Writing data frames

2003-12-30 Thread Simon Fear
; -Original Message- > From: Andy Bunn [mailto:[EMAIL PROTECTED] > Sent: 30 December 2003 00:44 > To: 'Ton van Daelen'; [EMAIL PROTECTED] > Subject: RE: [R] Writing data frames > > > Security Warning: > If you are not sure an attachment is safe to open

RE: [R] Writing data frames

2003-12-29 Thread Gabor Grothendieck
Try this with the m in your example: write.table(t(m), file="c:/R/tst.txt", col.names=names(m), row.names=F, quote=F, append=F) --- Date: Mon, 29 Dec 2003 16:21:15 -0800 From: Ton van Daelen <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [R] Writing data frames Hi there - I h

RE: [R] Writing data frames

2003-12-29 Thread Andy Bunn
The key is in the error message: "...can't coerce array into a data.frame" Even if as.data.frame.default is unhappy you can coerce m into a data.frame. write.table(data.frame(m1 = m[1], m2 = m[2]), file="C:\\R\\tst.txt", col.names=T, row.names=F, quote=F, append = FALSE) There's probably a nicer