Hello ! When grouping using data.table, mean and sum functions applied within groups work well but if we use sort(x) function it takes much longer. I would like to do first sort(x) and put it inside paste such as paste(sort(x),collapse=",") I was wondering if there is any more efficient of effective way of doing this? thanks in advance, Steve