[R] Permutations

Rolf Turner rolf at math.unb.ca
Wed Jul 14 00:16:42 CEST 2004


Dang!!! Forget it.  My random restricted permutation generator
doesn't ``quite'' work.  Further testing --- which I should've done
before posting (sigh) --- reveals that it can get into a situation in
which there's nothing left to sample from, and it still needs to fill
out the permutation.  I.e. it has painted itself into a corner.

Perhaps one could put in a test for this situation and just start
again if it happens, but this makes me uneasy.  What happens to the
``equal probability'' of all the generated permutations?

Mebbe somebody else can come up with something cleverer.  Sorry if I
got your hopes up.

				cheers,

					Rolf Turner
					rolf at math.unb.ca




More information about the R-help mailing list