[R] permutations function

2003-09-20 Thread lamack lamack
Dear all If I consider d- c(1,2,3,4) N- 4 n- 2 out1- matrix(0,N^n,n) z-1 for(i in 1:N) { for(j in 1:N) { out1[z,1] = d[i] out1[z,2] = d[j] z- z+1 } } library(gregmisc) out2- permutations(N,n,d,T,T) I have that out1==out2. Ok Now, if I consider d- c(1,2,3,4) N- 4 n- 3 out1-

Re: [R] permutations function

2003-09-20 Thread Uwe Ligges
lamack lamack wrote: Dear all If I consider d- c(1,2,3,4) N- 4 n- 2 out1- matrix(0,N^n,n) z-1 for(i in 1:N) { for(j in 1:N) { out1[z,1] = d[i] out1[z,2] = d[j] z- z+1 } } library(gregmisc) out2- permutations(N,n,d,T,T) I have that out1==out2. Ok Now, if