permute icon indicating copy to clipboard operation
permute copied to clipboard

ShuffleSet Accepts Only Number of Observations as Input

Open DarioS opened this issue 2 years ago • 2 comments

It would be desirable to allow a vector of characters to permute and avoid needing to recode the result from indices to values.

DarioS avatar Dec 19 '22 06:12 DarioS

I don't want to alter shuffle() or shuffleSet() to do this, but I could add a permutations() that would do what you wanted (internally call shuffleSet() and then us the set of permutations to index the supplied vector). Would that suffice?

gavinsimpson avatar Dec 19 '22 10:12 gavinsimpson

Ah, yes, you wouldn't want to change the API of shuffleSet to keep compatibility with existing uses of it.

DarioS avatar Dec 19 '22 20:12 DarioS