Skip to content
Prev 276720 / 398506 Next

Rekeying value denoting NA

On Nov 8, 2011, at 8:57 AM, Jean V Adams wrote:

            
Agreed this is what _should_ be done.
But ... I thought she wanted (unwisely in my opinion) to go the other  
way, NA's -> -999. In R the replacement of NA's is a bit convoluted  
because nothing "=="'s NA. You might need use the `is.na` function in  
this manner.

  df[is.na(df[["MAR"]]), "MAR"] <- -999