inst/shiny/src/server/manip_server.R

output$network_manip <- renderVisNetwork({
  nodes <- data.frame(id = 1:3)
  edges <- data.frame(from = c(1,2), to = c(1,3))
  
  visNetwork(nodes, edges) %>%
    visOptions(manipulation = TRUE)
})

output$view_manip <- renderPrint({
  input$network_manip_graphChange
})

output$code_network_manip <- renderText({
  '
  visNetwork(nodes, edges)
    visOptions(manipulation = TRUE))
 '
})

Try the visNetwork package in your browser

Any scripts or data that you put into this service are public.

visNetwork documentation built on Jan. 10, 2018, 1:04 a.m.