Re: [R] read stata data file

From: Charilaos Skiadas <cskiadas_at_gmail.com>
Date: Thu, 06 Mar 2008 21:23:41 -0500

On Mar 6, 2008, at 9:05 PM, John Taffe wrote:

> 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?

library(foreign)

or

require(foreign)

>
> John Taffe
>
> Biostatistician
> Centre for Developmental Psychiatry and Psychology
> Faculty of Medicine Nursing and Health Science
> Monash University, Australia
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

Haris Skiadas
Department of Mathematics and Computer Science Hanover College



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 07 Mar 2008 - 02:27:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Mar 2008 - 02:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive