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
Outside grouping, matrices in j are auto-converted by as.data.table.list() so that entries are OK as long as the dimensions look "right" in the same way that as.data.table() works:
Note that the case without .(...) in grouping is not interesting, since the return value is always "plain" like what you'd get with with(), i.e. the output need not be a data.table.
Inside grouping, as of #6054, we have this behavior:
DT[, cbind(b), by=a] # OK, 2 columns output# !! inconsistent with ungrouped case: 2 columns, equivalent to `DT[, .(c(b,b)), by=a]`# IMO consistency would say this should be DT[, .(b, b), by=a]DT[, cbind(b, b), by=a]
DT[, .(cbind(b)), by=a] # OK, 2 columns output# error as of #6054, but for consistency could be DT[, .(b,b), by=a]DT[, .(cbind(b, b)), by=a]
# error, IMO this implies the last un-grouped case should also be an error -- only singletons are recycled.DT[, .(1, 1:2, 1:3), by=a]
Activity