threeCol2listMat

Share:

Description

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.

Usage

1
2
threeCol2listMat(a = c("a", "b", "c", "c"), b = c("a", "b", "b", "b"),
  v = c(1, 2, 3, 4))

Arguments

a

(vector): vector of source node names.

b

(vector): vector of target node names.

v

(vector): vector of edge weights names.

Value

list of vectors matrix representation.

Examples

1
threeCol2listMat(a = c("a","b","c","c"), b = c("a","b","b","b"), v = c(1,2,3,4))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.