[R] All possible permutations of a 3 group assignment vector

2010-06-21 Thread Duplisea, Daniel
Hello. Given this group assignment vector x: x= rep(letters[1:3],c(9,21,9)) I would like to know the number of all possible unique permutations of x and also obtain the matrix of them. Thus, each vector should still contain 9*a, 21*b and 9*c, but case assigment must be different for one case

Re: [R] All possible permutations of a 3 group assignment vector

2010-06-21 Thread Charles C. Berry
On Mon, 21 Jun 2010, Duplisea, Daniel wrote: Hello. Given this group assignment vector x: x= rep(letters[1:3],c(9,21,9)) I would like to know the number of all possible unique permutations of x and also obtain the matrix of them. Do you mean what would ncol( unique( replicate(