Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.A41.4.33.0104120936190.60936-100000@homer24.u.washington.edu>
Date: 2001-04-12T16:38:04Z
From: Thomas Lumley
Subject: Write to a file
In-Reply-To: <002d01c0c36d$8b5c2fa0$1000a8c0@COPPER>

On Thu, 12 Apr 2001, Hongli Li wrote:

> Hi,
>
> I am trying to write a vector of list in to a file. I used the following
>        write(result,file="ttest.txt")
> I got an error message
>        Error in cat(list(...), file, sep, fill, labels, append) :
>                  argument 1 not yet handled by cat
>
> Then I tested the property of my object
>
> > is.vector(result[])
> [1] TRUE
>
> > is.list(result[])
> [1] TRUE
>
> > is.list(result)
> [1] TRUE
>
> > is.vector(result)
> [1] TRUE
>
> I don't understand why my list of vector can not be handled by cat.
>

write is for writing matrices. As the documentation for write() suggests,
see save() and write.table() for other possibilities (and dump())

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._