I am trying to use data.table
for a better performance but dont know how to do the equivalent of distinct %>% summarize
in dplyr
. Any ideas how I could adapt the following code to data.table
?
group_by_('x,y,z') %>%
distinct('h', .keep_all = TRUE) %>%
summarise(tot1 = sum(value1), tot2 = sum(value2))