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
I recall something similar so this FR could eventually be a duplicate already. Yes, there is #1104.
Currently, when using both by and keyby we get an error.
data.table(a=1,b=2,d=3)[, .SD, by="a", keyby=TRUE]
#Error in `[.data.table`(data.table(a = 1, b = 2, d = 3), , .SD, by = "a", : # Provide either by= or keyby= but not both
Would be useful to support such syntax, so if user wants to have a sorted groups, then just passing T/F is sufficient, and there is no need to switch between the arguments that needs to be suplied to function.
Moreover using keyby as logical is what we actually do internally, at the very top of processing by/keyby arguments. And there is a comment there: # Assign to 'by' so that by is no longer missing and we can proceed as if there were one by
Following line, the else branch, could be simplified:
Activity
keyby arg now a sorting flag, #4307
[-]allow to use `keyby` arg as a sort flag, together with `by` argument[/-][+]keyby=TRUE/FALSE together with by=[/+]