If needed I can put together a dataset, but my question is somewhat general.
accts <- accts[, .SD[which.max(EE)], by=DnB.Name]
I've got a DT of about 350k rows, and some of the DnB.Name's (Duns and Bradstreet Company Name) are duplicates with differing employee counts (EE), I only care about the highest number of each and can disregard the rest.
Anyway, DT is usually lightning quick, so I figure I must be doing something wrong?