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:
I recall something similar so this FR could eventually be a duplicate already. Yes, there is #1104.
Currently, when using both
by
andkeyby
we get an error.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 processingby
/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:data.table/R/data.table.R
Line 2316 in b1b1832
The text was updated successfully, but these errors were encountered: