You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's quite frequent to have to recode several distinct values to NA. So far the shortest solution I could find to do that is e.g. na_if(na_if(vec, 88), 99). if_else(vec %in% c(88, 99), NA_real_, vec) or case_match(vec, c(88, 99) ~ NA, .default=vec) are also possible but relatively verbose. Could it be allowed to pass multiple arguments to na_if so that one could write na_if(vec, 88, 99) instead?
The text was updated successfully, but these errors were encountered:
It's quite frequent to have to recode several distinct values to NA. So far the shortest solution I could find to do that is e.g.
na_if(na_if(vec, 88), 99)
.if_else(vec %in% c(88, 99), NA_real_, vec)
orcase_match(vec, c(88, 99) ~ NA, .default=vec)
are also possible but relatively verbose. Could it be allowed to pass multiple arguments tona_if
so that one could writena_if(vec, 88, 99)
instead?The text was updated successfully, but these errors were encountered: