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 (
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
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
addr1...). It's a very simple algorithm.
I have managed to do it in a non very elegant way using a mix of
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