RE: [R] Simple question about export

About this list Date view Thread view Subject view Author view Attachment view

From: Adaikalavan Ramasamy (gisar@nus.edu.sg)
Date: Thu 13 Mar 2003 - 00:47:33 EST


Message-id: <024D6AEFCB92CB47BA1085751D184BB80105F225@MBXSRV03.stf.nus.edu.sg>

Well, you did not specify the object to save in write.table(). Suppose
you want to save the following:

x <- matrix( c(1:25), nrow=5)
write.table(x, file="c:/my.output.file.txt")

If all goes well, you should see the prompt without any message.

Also use "/" rather than "\" as it is reserved for escape sequences.

You might also consider setting the option sep="\t" and quote=FALSE to
make it truly tab-delimited file. There is also row.names, col.name
option. Try reading the R Data Import/Export or write.table() again.

-----Original Message-----
From: Michael Miettinen [mailto:michael_miettinen@yahoo.com]
Sent: Wednesday, March 12, 2003 9:13 PM
To: R-help@stat.math.ethz.ch
Subject: [R] Simple question about export

Hi,

Sorry about making this stupid question, but I did not
find the answer from documentation.

I managed to read my spss .sav file into the R, no
problem. Next I would like to write this data to a
file in ascii-format. I tried to use write.table and I
got no error messages, but no file either. What is the
right way to make it?

At least write.table("c:\foo\data.dat") does not
work..

Thanks in advance!

Michael

=====
michael_miettinen@yahoo.com
+358 40 849 1140

__________________________________________________

Yahoo! Web Hosting - establish your business online

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:24 EST