[R] Simple question about export

Mathieu Roelants mathieu.roelants at vub.ac.be
Wed Mar 12 15:08:50 CET 2003


----- Original Message -----
From: "Michael Miettinen" <michael_miettinen at yahoo.com>
To: <R-help at stat.math.ethz.ch>
Sent: Wednesday, 12 March, 2003 2:13 PM
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

>From the rw-FAQ: Backslashes have to be doubled in R character strings:

write.table(x, "c:\\foo\\data.dat")

or use a forward slash:

write.table(x, "c:/foo/data.dat")

where x is your data object


Mathieu Roelants, Project Vlaamse Groeicurven    mathieu.roelants at vub.ac.be
Laboratorium Antropogenetica Vrije Universiteit Brussel, Pleinlaan 2, B-1050
Brussel   Tel.+Fax 02/629.34.07
Laboratory of Anthropogenetics - University of Brussels, Pleinlaan 2, B-1050
Brussels (Belgium) Tel.+Fax + 32 2 629 34 07



More information about the R-help mailing list