I have data with a grouping variable 'group' and a logical variable 'logic'.

```
library(data.table)
library(dplyr)

dt <- data.table(
    logic = c(TRUE, TRUE, FALSE, TRUE, TRUE, TRUE),
    group = c("A" , "A",  "A"  , "B" , "B" , "B")
)

```

I would like to filter groups, where `all` values in the 'logic' column are `TRUE`.

`dplyr` works as expected, and keeps only `group = B`

```
dt %>% 
  group_by(group) %>% 
  filter(all(logic))
# Source: local data table [3 x 2]
# Groups: group

#   logic group
# 1  TRUE     B
# 2  TRUE     B
# 3  TRUE     B

```

However, my attempts with `data.table` have failed, either bringing all table or nothing.

```
dt[all(logic), group, by = group]
# Empty data.table (0 rows) of 2 cols: group,group

dt[all(.SD$logic), group,by = group]
#    group group
# 1:     A     A
# 2:     B     B

```