Sunday, 21 October 2018

How to create a second dropdown list based on a group of edges with visNetwork in R?

Similar in spirit to Groups of edges and select in visNetwork in R, I'm wondering how to create a dropdown list based on the edges as opposed to my nodes using the visNetwork package. I think this is possible with the visSetSelection function, but that requires using shiny. I'm delivering the final product in an html rendered from an rmarkdown, not deploying it from a server, so I don't think that's a possibility.

Is there a way to replicate this function outside of shiny? I don't fully understand the terminology in the documentation, but I think what I want to do is similar to the nodeIdSelection or the selectedBy arguements in the visOptions functions where you can created an "HTML select element" but based on the edge list and not on the node list.

The data set for this particular issue is proprietary, but here's some dummy data. I'd like to be able to select by the "Priority" of the edge.

edges <- tibble(from = 1:30, to = from %/% 5, priority = from %/% 10)



from How to create a second dropdown list based on a group of edges with visNetwork in R?

No comments:

Post a Comment