[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. Rike

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