Grammatical error leading to confusion in latest tidyverse blog dplyr post

In the latest tidyverse dplyr blog post, first example explanation:

Filter for rows where “US” and “CA” have a score between 200-300, or rows where “PR” and “RU”

Should be

Filter for rows where “US” or “CA” have a score between 200-300, or rows where “PR” or “RU”

since it's impossible to have rows where US AND CA, or PR AND RU have anything - it's 1 row per country.

Bot the biggest deal, but an ironic confusion given the subject.

IDK if this is the right place to post this.

1 Like

Also since it's the same blog post: for recode_values, case_match is ostensible the same as recode_values and that's addressed but at the end - could y'all link to that section after:

But score == is repeated so many times!

Since folks who use case_match will be wondering about it, and then you go to another function, before coming back to the case_match similarity.

One small wording concern: calling recode_values() a drop-in replacement for case_match() is a bit misleading in practice. While the overall logic is the same, the change from .default to default means existing code cannot be updated by a simple search-and-replace. If .default is left unchanged, code errors immediately.

In larger projects with substantial data wrangling, this becomes non-trivial, especially when case_match() and case_when() are used side by side and need to be preserved. You cannot safely replace all .default arguments globally without breaking other code.

So while the functions are conceptually very close, I would hesitate to describe this as a true drop-in replacement from a practical maintenance perspective.

Apart from that, great work — thanks for pushing this forward.