Re: [R] Find pattern in matrix

2011-07-25 Thread David Winsemius
On Jul 21, 2011, at 6:12 PM, Q wrote: Hello all, I'm trying to find all combinations of 4 numbers that satisfy 4 criteria, inside of a matrix (62 x 25). I've found a way to do this using for loops, but it is extremely slow because it involves checking every possible combination of number

Re: [R] Find pattern in matrix

2011-07-22 Thread csrabak
This kind of problem can be addressed with branch and cut or similar Operations Research methods. Get a look at the CRAN task view "Optimization and Mathematical Programming" specially the packages for Integer Programming and Mixed Integer Programming. Depending on the demands you have in yo

[R] Find pattern in matrix

2011-07-21 Thread Q
Hello all, I'm trying to find all combinations of 4 numbers that satisfy 4 criteria, inside of a matrix (62 x 25). I've found a way to do this using for loops, but it is extremely slow because it involves checking every possible combination of numbers (567300) to see if the criteria are satisfied