m <- matrix(c(0, 1, 2,
1, 0, 3,
2, 3, 0), nrow = 3)
network_to_vector(m, full = FALSE) # upper triangle: 1 2 3
#> [,1] [,2] [,3]
#> [1,] 1 2 3
network_to_vector(m, full = TRUE) # all 9 entries
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
#> [1,] 0 1 2 1 0 3 2 3 0