5 ms·
Dplyr actually supports some really cool join functionalities that I wish were in SQL implementations, including: - Ability to specify whether your join should
by frogamel 3y ago
Dplyr actually supports some really cool join functionalities that I wish were in SQL implementations, including:
- Ability to specify whether your join should be one-to-one, many-to-one, etc. So that R will throw an error instead of quietly returning 100x as many rows as expected (which I've seen a lot in SQL pipelines).
- A direct anti_join function. Much cleaner than using LEFT JOIN... WHERE b IS NULL to replicate an anti join.
- Support for rolling joins. E.g. for each user, get the price of their last transaction. Super common but can be a pain in SQL since it requires nested subqueries or CTEs.
- sa-code 3y agoPolars does this too!