subsample_replicates function

Retain only a random subset of the replicates in a design