There could be `sort` method for data.table which basically could be ```r \x setorderv(copy(x), names(x))[] ```