R
Rothman
I have data like so:
Num1 Num2 Num3 Num4 Num5
3 4 10 7 2
6 7 3 8 3
1 7 5 10 2
3 8 1 10 8
....and so forth. Essentially random whole numbers in five columns.
What I'd like to do is to find out if Numx = y, then list the combination.
So, if I was looking for the number 3 in Num1, it'd return a list like (using
the table above):
Num1 Num2 Num3 Num4 Num5
3 4 10 7 2
3 8 1 10 8
I'd have to do this for each column (i.e. if Num2 = some number, then give
me the combinations for that; if Num3 = etc.). For those other columns, I'd
like to keep the horizontal order of the variables intact (e.g. Num2 = 7):
Num1 Num2 Num3 Num4 Num5
6 7 3 8 3
1 7 5 10 2
Any ideas?
Thanks again in advance.
Num1 Num2 Num3 Num4 Num5
3 4 10 7 2
6 7 3 8 3
1 7 5 10 2
3 8 1 10 8
....and so forth. Essentially random whole numbers in five columns.
What I'd like to do is to find out if Numx = y, then list the combination.
So, if I was looking for the number 3 in Num1, it'd return a list like (using
the table above):
Num1 Num2 Num3 Num4 Num5
3 4 10 7 2
3 8 1 10 8
I'd have to do this for each column (i.e. if Num2 = some number, then give
me the combinations for that; if Num3 = etc.). For those other columns, I'd
like to keep the horizontal order of the variables intact (e.g. Num2 = 7):
Num1 Num2 Num3 Num4 Num5
6 7 3 8 3
1 7 5 10 2
Any ideas?
Thanks again in advance.