TDA's mdefg: builds the adjacency matrix of the current
graph, with missing substituted for absent edges (TDA's
sc=, default -1 there; 0 here, which gives the usual
weighted adjacency matrix).
Examples
e <- data.frame(from = c(1, 1, 2), to = c(2, 3, 3),
value = c(5, 2, 7))
tda_mdefg(e)
#> [,1] [,2] [,3]
#> [1,] 0 5 2
#> [2,] 5 0 7
#> [3,] 2 7 0