samp.within function

Shuffles a sequence within groups defined by the input vector