3 ms·
I avoid joins in R like a plague. Been burned. If I am working with a finite number of colummns, I just use base R match and add column by column. yes it breaks
by naijaboiler 4y ago
I avoid joins in R like a plague. Been burned. If I am working with a finite number of colummns, I just use base R match and add column by column. yes it breaks DRY but I don't get weird surprises. and I can re-run any section of the code at any time from any point without breaking things or joining the same and creating unintended duplicate columns
- LaserPineapple 4y agoWhat kind of weird surprises have you run into? Are they specific to R?
- victorbohr 4y agoTake a look at the powerjoin package. It let's you specify strict rules for your joins, for example requiring unique keys in the right-side table when doing a left join. It's got some other neat features as well.