Generate an interactive network visualization using networkD3.

create_interactive_network(network, agent_types, width = 800, height = 600)

Arguments

network

igraph network object

agent_types

Character vector of agent types

width

Width of the visualization (default: 800)

height

Height of the visualization (default: 600)

Value

networkD3 forceNetwork object

Examples

if (FALSE) { # \dontrun{
library(igraph)
net <- sample_smallworld(1, 50, 4, 0.1)
agent_types <- sample(c("type1", "type2", "type3"), 50, replace = TRUE)
interactive_net <- create_interactive_network(net, agent_types)
} # }