John Wiedenhoeft wrote:
Dear all,
I'm sorry I have to bother you with this newbie stuff.
Within a loop I obtain pairs of values x - c(a, b). An empty set M is
defined before the loop (as a list or whatever). Now I want to do the
following: if there is a vector y in M that contains at
Dear Uwe,
Many thanks for your help! Unfortunately, your function doesn't do
exactly what I need (I slightly modified it, but I don't think that
caused the problem):
M - list()
temp - NA
for (i in 1:length(deppat))
{
a - deppat[i]
b - deptest[i]
x - c(a, b)
if (i 1)
temp -
Ahh, got it:
There must be an error in reasoning, but I can't figure out where it
is...
Consider 3 pairs: (1, 2), (2, 3), (1, 3), first is put in the first
line, second in the second, and third in the first, resulting in the 3
being contained in both. Simply folding lines together solves it.
Dear all,
I'm sorry I have to bother you with this newbie stuff.
Within a loop I obtain pairs of values x - c(a, b). An empty set M is
defined before the loop (as a list or whatever). Now I want to do the
following: if there is a vector y in M that contains at least one of
the values of x, then