let's say I have the following tibble:
df <- tibble(a=c(NA, 1, 0), b=c(2, 0, NA))
I now want to replace all NA with zero. However, in order to distinguish between a NA-zero and an actual zero, there should be an a_is_na and b_is_na column.
I know that this can easily done with mutate like mutate(a_is_na = is.na(a)). However, I have about 20 columns and what to automatically create the correct column names and values. What is a clever way in R to do so?