POLMETH Archives

Political Methodology Society

POLMETH@LISTSERV.WUSTL.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Battista <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Sun, 12 Aug 2007 20:24:23 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (16 lines)
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]

ATOM RSS1 RSS2