Question

[Solved] not a Stata version 5-12 .dta file

I am trying to use existed data in my pc which is .dta file.

I’m trying to open it in R using the following command:

mydata<-read.dta(file="C:UsersmeDesktopdata_raw.dta")

But there is this error

>> not a Stata version 5-12 .dta file 

Any help will be appreciated. Thanks.

Enquirer: SBA

||

Solution #1:

Had the same problem and Roland’s suggestion of using read_dta from the haven package worked!

To reiterate Roland’s comment that helped form this solution.
read.dta from the foreign package can only read files from Stata version 5 to 12 and your file seems to be created by a version outside that range.

haven’s read_dta can read dta files outside of this range.

Respondent: Weevils

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy