You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the function also had a method for data.table: relevant SO question here and there. For instance to find the number of unique combinations (v2, v3) within groups defined by v1, one could do:
The SO question that triggered the thought:
Instead of having to do:
We could do with:
This'll especially be faster for data.tables though because we don't have to subset the entire data.table to know the number of unique values.
Here's a quick benchmark:
We could, in addition, also internally optimise
length(unique(.))
ton_unique(.)
.The text was updated successfully, but these errors were encountered: