Subject: | |
From: | |
Reply To: | |
Date: | Wed, 15 Aug 2007 17:53:58 -0400 |
Content-Type: | TEXT/PLAIN |
Parts/Attachments: |
|
|
Jim's advice is more flexible, but also note that Stata has a command
called -saveold- that will save Stata datasets in version 7.0 format.
On Sun, 12 Aug 2007, Jim Battista wrote:
> Date: Sun, 12 Aug 2007 20:24:23 -0400
> From: Jim Battista <[log in to unmask]>
> Reply-To: Political Methodology Society <[log in to unmask]>
> To: [log in to unmask]
> Subject: Re: [POLMETH] importing Stata files into R
>
> Jonathan Miller wrote:
>> Hi all. I am in the beginning stages of learning R and previously used
>> Stata. I have some Stata 9 files that I have tried to import into R, but
>> it
>> seems that the read.dta only works for Stata 8.0 and earlier versions...is
>> that correct? If so, what is the best way to import Stata 9.0 or later
>> files into R? Thanks for any pointers.
>
> No doubt others with more stata skills will have better solutions, but this
> will work irrespective of version:
>
> (1) From stata, outfile [var1 var2] using filename.csv, comma
> (2) In R, data<-read.csv(filename.csv, header=T)
>
> Jim Battista
> [log in to unmask]
>
- Fred
Note updated contact info (effective August 01, 2007):
< ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Frederick J. Boehmke
< Associate Professor of Political Science
> University of Iowa
< 341 Schaeffer Hall
> Iowa City, IA 52242
<
> Office: 361 Schaeffer
< Phone: 319 335 2342
> Fax: 319 335 3400
<
> [log in to unmask]
< http://www.fredboehmke.net
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|