[R] permutations in R
william108 at gmail.com
Sat Mar 14 02:06:43 CET 2009
Hi. Does anyone know of a function which will take as input a number n (or a
let of n letters) and will give out, one at a time, the permutations of n
(or of those n letters) as a vector?
So that I can use the permutations one at a time. And such that it will
exhaust all the permutations with no repeats.
For example if n is 3, I would want a function which I could use in a loop
and the first time I use it in the loop it may give the vector
and then the next time in the loop it may give
and so on so that after 6 iterations through the loop I would get all 6
permutations of 123.
View this message in context: http://www.nabble.com/permutations-in-R-tp22507989p22507989.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help