search for: 290931

Displaying 1 result from an estimated 1 matches for "290931".

Did you mean: 20931
2005 May 07
3
converting NA/non-NA's to a binary variable
Dear R colleagues, I am trying to create a new column in a data frame, which converts values and NA's from another column into binary format. Essentially I need the NA's to become 1 and the rest to be 0. The code I wrote is returning the following error message: Error in if (mort[i, 4] != NA) mort[i, 8] <- 0 else if (mort[i, 4] == : missing value where TRUE/FALSE needed