Extend branches argument in networkD3

Does anyone know the argument to extend all branches to the maximum level in radialNetwork in the networkD3 package v0.4.9?

This is all I can find:

> args("radialNetwork")
function (List, height = NULL, width = NULL, fontSize = 10, fontFamily = "serif", 
    linkColour = "#ccc", nodeColour = "#fff", nodeStroke = "steelblue", 
    textColour = "#111", opacity = 0.9, margin = NULL) 
NULL

There is no such argument in networkD3's radialNetwork() function. That capability is not built in to the CRAN release version/s of networkD3.

However, the current dev version of networkD3 on Github can do this with the treeType = 'cluster' and direction = 'radial' arguments in the new treeNetwork() function.

for example...

devtools::install_github('christophergandrud/networkD3')

library(networkD3)
library(jsonlite)

URL <- paste0("https://cdn.rawgit.com/christophergandrud/networkD3/",
              "master/JSONdata//flare.json")
flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)

treeNetwork(flare, direction = 'radial', treeType = 'cluster')
2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.