Skip to content
Prev 5357 / 20628 Next

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