suppose I have a dataframe where there are two columns that indicate a direct relationship between the parallel values.
c2 <- c(2,5,7,8,10)
c1 <- c(1,3,2,7,5)
df <- data.frame(c1, c2)
Such that:
1 is related to 2 [1],
2 is related to 7 [3],
7 is related to 8 [4]
So I get a vector of the indexes 1,3, and 4
and then 3 is related to 5 [2],
and 5 is related to 10 [5]
so I get a vector of the indexes 2 and 5?
It hurts my brain.