powered by
This function takes a three vectors of equal length (source nodes, target nodes, and edge weights) and return the adjacency matrix as a list of vectors.
threeCol2listMat(a = c("a", "b", "c", "c"), b = c("a", "b", "b", "b"), v = c(1, 2, 3, 4))
(vector): vector of source node names.
(vector): vector of target node names.
(vector): vector of edge weights names.
list of vectors matrix representation.
# NOT RUN { threeCol2listMat(a = c("a","b","c","c"), b = c("a","b","b","b"), v = c(1,2,3,4)) # }
Run the code above in your browser using DataLab