Trying to combine to columns with non-overlapping data using the mutate(coalesce) function in r:
data0 %>% mutate(keys = coalesce(resp_A.keys, resp_B.keys))
I’m not sure why but it only ever includes in keys whatever it put first in the coalesce function: If resp_A is put first it only moves that column to keys, if resp_B is put first, it only moves that to keys. I’ve used this function plenty of times in the past with no issues. Any idea what this is happening?
Ensured no NA values, same type (characters), subsetting the data