Skip to content

lmer function

1 message · Ben Bolker

#
Please reply to the list!

  I think the warnings are an edge-case/false positive.
  When reading a character vector R doesn't convert "NA" to a 
not-available (NA) value (because people might have character vectors 
denoting, say, North America (NA) or Nabisco (NA)).  These provoke a 
warning when converting.  Try this function instead to convert:


as_num <- function(x) {
     x <- as.character(x)
     x[!is.na(x) & (x=="NA")] <- NA_character_
     as.numeric(x)
}
On 8/1/21 5:00 PM, mina jahan wrote: