Message-ID: <4D5E9F23.3030203@umd.edu>
Date: 2011-02-18T16:32:35Z
From: Jeffrey Harring
Subject: Missing data in R...
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.
Thanks,
Jeff
--
****************************************************************************
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