Displaying 3 results from an estimated 3 matches for "perm2".
Did you mean:
perm
2010 Apr 24
2
multiple paired t-tests without loops
...mplete the job and I
was hoping that someone could tell me how to do it faster?
thank you kindly,
Matthew Finkbeiner
--------------------------------
"Sample" "C1" "C2" "PermN"
1 5 8 perm1
1 4 3 perm1
1 6 4 perm1
2 2 6 perm1
2 3 1 perm1
2 7 4 perm1
1 8 5 perm2
1 3 4 perm2
1 6 4 perm2
2 6 2 perm2
2 1 3 perm2
2 7 4 perm2
1 5 8 perm3
1 3 4 perm3
1 6 4 perm3
2 2 6 perm3
2 1 3 perm3
2 7 4 perm3
1 8 5 perm4
1 4 3 perm4
1 4 6 perm4
2 6 2 perm4
2 3 1 perm4
2 4 7 perm4
1 5 8 perm5
1 4 3 perm5
1 4 6 perm5
2 2 6 perm5
2 3 1 perm5
2 4 7 perm5
1 8 5 perm6
1 3 4 perm6...
2004 Jul 16
0
Permutations (summary)
...and looking it up in z, the vector of all
previously accepted ordered
permutations. If its found then the while loop tries again and if it is NOT
found then the permutation that samp just stored in z[i,] is accepted.
The code is followed by a test generating 10,000 random permutations.
ordered.perm2 <- function(N) {
samp <- function() c(apply(matrix(z[i,] <<- sample(12,12),3),2,sort))
s <- vector(length = N, mode = "character")
z <- matrix(nr = N, nc = 12)
for(i in 1:N)
while( (s[i]<-paste(samp(),collapse=" ")) %in% s[seq(len=i-1)] ) {...
2004 Jul 13
12
Permutations
Dear R users,
I?m a beginner user of R and I?ve a problem with permutations that I don?t
know how to solve. I?ve 12 elements in blocks of 3 elements and I want only
to make permutations inter-blocks (no intra-blocks) (sorry if the
terminology is not accurate), something similar to:
1 2 3 | 4 5 6 | 7 8 9 | 10 11 12 ----------1st permutation
1 3 2 | 4 5 6 | 7 8 9 | 10 11 12 NO
- -
3 2 1