I have dataframe of integers from 1 to 900.
nodelist <- data.frame(node_id=seq(1:900))
I want to create a new dataframe of two columns (top, bottom) that has each combination of the vector nodelist. The top and bottom number cannot be the same. Something like:
top bottom
1 2
1 3
1 4
2 1
2 3
I have tried cross() and expand.grid() to no avail.