Skip to content
Prev 294981 / 398506 Next

Recoding numeric value

On May 18, 2012, at 2:26 PM, Giggles wrote:

            
The easiest and canonical way would be:

  is.na(pharma311$explain) <- pharma311$explain == 6

See ?is.na for more information.

Just to be picky, an NA value is not the same as blank. That is NA != "". R has specific behavior in dealing with NA values.

Regards,

Marc Schwartz