powered by
Sorts each link's Nodes by the smallest value. Removes links that both nodes are the same.
OrderNames(M)
data.frame to have the names ordered. Node.1, Node.2 and correlation value.
a data.table whith Node.1 and Node.2, sorted by the smallest value between both.
# NOT RUN { Nodes = LETTERS[1:10] Z = data.frame(Node.1 = sample(Nodes) , Node.2 = sample(Nodes), cor = runif(10,-1,1)) OrderNames(Z) # }
Run the code above in your browser using DataLab