; -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
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
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