[R] Export to File...

About this list Date view Thread view Subject view Author view

From: Ko-Kang@xtra.co.nz
Date: Wed 02 May 2001 - 18:17:15 EST


Message-ID: <003601c0d2e0$4d65d340$0b5037d2@kokangwang>

Hi,

I've been reading the Data Import and Export manual (page 25 on Connection
chapter) but somehow I can't manage to get what I want.

I have a 28x28 distance matrix, which I would like to export to a file.
What I did was something like:
    zz <- file("ex.data", "w") # open an output file connection
    cat( traffic.manDist, file = zz ) # traffic.manDist is my matrix name
    close(zz)

But instead of exporting the matrix, it export each number in the matrix and
separating each number into one line!

Can anyone tell me where I did wrong? Much appreciated!

Cheers,

Kevin

----------------------------------------------------------------
Ko-Kang Kevin Wang
Statistical Analysis Division Leader
Software Developers' Klub
University of Auckland
New Zealand

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:40 EST