Skip to content
Prev 5358 / 20628 Next

Missing data in R...

On 11-02-18 11:32 AM, Jeffrey Harring wrote:
see the 'na.strings' argument in ?read.table (also applies to read.csv)
  the problem is that having the '.' in there in the first place will
make your numeric variables turn into factors -- you can deal with this via

dat1$y <- as.numeric(as.character(dat1$y))

which will make anything that can't be interpreted as numeric into an NA
(and issue a warning) but it is easier and clearer to specify na.strings
in the first place.

  For what it's worth, you might ask these kinds of questions on the
general R-help list -- they are not specific to mixed models.  (Make
sure to read the Posting Guide first ...)