[R-sig-ME] Missing data in R...

Jeffrey Harring harring at umd.edu
Fri Feb 18 17:32:35 CET 2011

I am reading in data in the "long" format into R to use in nlme ( ). 
There is some missing data that is denoted by a period "."
I would like to assign these .'s the missing data value NA. I have been 
unable to locate code on the web that might perform this function.

This is what I have thus far:   dat1[dat1$y == ".", "y"] <- NA

where the data are assigned to data frame dat1 and the missing data is 
in a variable called y.

If anyone has a suggestion I am all ears.


Jeffrey R. Harring, Assistant Professor
Department of Measurement, Statistics&  Evaluation (EDMS)
1230 Benjamin Building
University of Maryland
College Park, MD 20742-1115

Phone: 	301.405.3630
Fax: 	301.314.9245
Email: 	harring at umd.edu
Web:  	http://www.education.umd.edu/EDMS/fac/Harring/webpage.html

More information about the R-sig-mixed-models mailing list