dupPartition function

Partition the data by grouping together duplicated data