dplyr
dplyr copied to clipboard
`first()`, `last()`, and `nth()` should have `na.rm` argument
Since they're summary functions
Do you want it to be na.rm
or na_rm
? first()
and friends have order_by
as an argument already so we'd end up with a mix of snake and dot case.
I think I have a slight preference for na_rm
to avoid the mixed case, and because we generally use _
. I personally prefer this over being similar to base R usage of na.rm
Hmmmm, I'm not sure. In most cases I think using snake case would be the obvious choice, but na.rm
is just so ubiquitous. But you're probably right that na_rm
is the better choice.
Good point on the mixing of cases, I just changed all to na_rm instead in #6257
Randomly stumbled across a case where someone could use this https://stackoverflow.com/questions/73282239/retrieve-first-non-na-value-based-on-another-time-variable