nActors <- 5
network <- create_network(matrix(1, nActors, nActors))
# set ties
set_tie(network, i = 0, j = 1, value = 0)
set_tie(network, i = 0, j = 2, value = 0)
# returns FALSE and keeps the network unchanged as the network is not reflexive
set_tie(network, i = 0, j = 0, value = 1)
# there are two equivalent ways to re-transform the network into a matrix
as.matrix(network)
network_as_matrix(network)
Run the code above in your browser using DataLab