if (FALSE) {
nodes <- data.frame(id = 1:3, label = paste("Node", 1:3))
edges <- data.frame(from = c(1,2), to = c(1,3), label = paste("Edge", 1:2))
network <- visNetwork(nodes, edges)
shiny::shinyApp(ui = shiny::fluidPage(
visNetworkEditorUI(id = "id1")),
server = function(input, output, session) {
shiny::callModule(visNetworkEditorServer, "id1", object = shiny::reactive(network))
})
}
Run the code above in your browser using DataLab