[R] Help with write.foreign (exporting data to Stata)

Stefan Grosse singularitaet at gmx.net
Tue Jul 10 20:00:28 CEST 2007

I am not sure what you are doing there but what you need is

?write.dta once you have loaded the foreign package


-------- Original Message  --------
Subject: [R] Help with write.foreign (exporting data to Stata)
From: kdestler <kdestler at u.washington.edu>
To: r-help at stat.math.ethz.ch
Date: Tue Jul 10 2007 19:37:54 GMT+0200
> Hi.  I'm trying to export a dataframe from R into Stata to use a statistical
> function I have there.  I attached library write.foreign and renamed my
> variables to get them to match Stata's required format, and now have the
> following error:  "file /tmp/Rtmps7rmrM/file1c06dac8.raw not found"  Other
> than typing write.foreign, do I need to do something in R to get it to save
> the file on my hard drive?  When I search for the file name on my computer
> nothing comes up.  I'm using a Mac in case that makes a difference.
> Thanks,
> Kate

More information about the R-help mailing list