Re: [R] import from Stata, get NA

2013-06-09 Thread David Winsemius
On Jun 9, 2013, at 7:41 AM, Ulrike Pasda wrote: > Dear all, > I have troubles figuring out how to convert missing values from Stata > (treated as -1 and -2) into NAs in R. > To read in the dta file I use: data <- read.dta("data.dta") > > Is there an option to tell R to convert the -1 and -2 into

[R] import from Stata, get NA

2013-06-09 Thread Ulrike Pasda
Dear all, I have troubles figuring out how to convert missing values from Stata (treated as -1 and -2) into NAs in R. To read in the dta file I use: data <- read.dta("data.dta") Is there an option to tell R to convert the -1 and -2 into NAs ? Your help is appreciated. Thanks a lot in advance. Rik

Re: [R] import from stata

2009-04-15 Thread Dwayne Blind
Thank you very much Jorge, Phil and Stas. It is not the first time Phil ;-) 2009/4/15 Stas Kolenikov > You need a full name in quotes: > > auto <- read.dta("C:/Stata10/ado/base/a/auto.dta") > > works just fine on my computer. > > On 4/14/09, Dwayne Blind wrote: > > Dear R users, > > > > I am

Re: [R] import from stata

2009-04-14 Thread Stas Kolenikov
You need a full name in quotes: auto <- read.dta("C:/Stata10/ado/base/a/auto.dta") works just fine on my computer. On 4/14/09, Dwayne Blind wrote: > Dear R users, > > I am trying to import a table from STATA, a dta file. > > With a table called "table", this is what I do : > > library("forei

[R] import from stata

2009-04-14 Thread Dwayne Blind
Dear R users, I am trying to import a table from STATA, a dta file. With a table called "table", this is what I do : library("foreign") read.dta(table) It does not work. What am I doing wrong ? Best Regards, Dwayne [[alternative HTML version deleted]]