search for: aacbb

Displaying 3 results from an estimated 3 matches for "aacbb".

Did you mean: aabb
2006 Oct 13
5
combinatorics
Hi How do I generate all ways of ordering sets of indistinguishable items? suppose I have two A's, two B's and a C. Then I want AABBC AABCB AACBC ABABC . . .snip... BBAAC . . .snip... CBBAA [there are 5!/(2!*2!) = 30 arrangements. Note AABBC != BBAAC] How do I do this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14
2008 Dec 22
2
How can I avoid nested 'for' loops or quicken the process?
Hi All, I'm still pretty new to using R - and I was hoping I might be able to get some advice as to how to use 'apply' or a similar function instead of using nested for loops. Right now I have a script which uses nested for loops similar to this: i <- 1 for(a in Alpha) { for (b in Beta) { for (c in Gamma) { for (d in Delta) { for (e in Epsilon) { Output[i] <-
2008 Dec 29
0
Serial Correlation Test for Short Time Series
...t, clist),1,function(x) paste(x[1], x[2], x[3], sep="")) [1] "aabAA" "babAA" "cabAA" "aacAA" "bacAA" "cacAA" "aadAA" "badAA" "cadAA" "aabBB" [11] "babBB" "cabBB" "aacBB" "bacBB" "cacBB" "aadBB" "badBB" "cadBB" > dlist <- list(TRUE,FALSE) > apply(expand.grid(alist, blist, clist, dlist),1,function(x) paste(x[1], x[2], x[3], (x[4]), sep=""))[8:12] [1] "badAATRUE" "cadAATRUE&q...