Learn R Programming

DRaWR (version 1.0.3)

threeCol2listMat: threeCol2listMat

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

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

Run this code
# 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