I'm having problems in searching for my issue, because I haven't been able to phrase it , so I'll try to explain it with an example:
I got at least 4 columns (addr1...addr4 ; from different sources). I need to reduce those 4 columns to 1. For some rows, I get the four of them, for others only one, some I get addr1 and addr3, ecc.
The reduction is somewhat simple: theres one (addr2) that's more reliable, so I always should keep that one, if not, I should continue in a specific order (then addr3, then addr1...). It's a very simple algorithm.
I have managed to do it in a non very elegant way using a mix of mutate and ifelse branching, but I was wondering if there's a better way.
As I said, I didn't know how to "phrase" this issue, so searching was very unhelpful
HI @pablo,
You will need to post your code plus a small sample of the input data, and the desired output. This shows us what is working and may elicit responses with possible improvements.
HTH