Skip to content

read stata data file

2 messages · John Taffe, Charilaos Skiadas

#
Dear R-help list,

I'm new to R.  I tried to get R to read a Stata data file using the 
read.dta function in the package "foreign", which I downloaded and 
extracted to "C:\Program Files\R\R-2.6.2\library" on my pc. 

I tried

 > nora <- read.dta("nora.dta")

and got

Error: could not find function "read.dta"

I guess "foreign" needs to be installed.  How do you do this?

John Taffe

Biostatistician
Centre for Developmental Psychiatry and Psychology
Faculty of Medicine Nursing and Health Science
Monash University, Australia
#
On Mar 6, 2008, at 9:05 PM, John Taffe wrote:

            
library(foreign)

or

require(foreign)
Haris Skiadas
Department of Mathematics and Computer Science
Hanover College