if_na.Rd
Often, you want to substitute missing values with some implicit known value (e.g. if the question on number of sexual partners was skipped for sexually inactive people, you know the missing should turn into zero)
if_na(x, missing)
x | the variable |
---|---|
missing | What to replace missing values with |
#> [1] 1 3 5 10 0 29