I found when a conflict between the networkD3 and d3treeR, below is a reproducible example:
library(shiny)
library(plotly)
library(networkD3)
library(treemap)
library(d3treeR)
ui <- fluidPage(
plotlyOutput("p"),
forceNetworkOutput("o"),
d3treeOutput("a")
)
Dear developer,
I found when a conflict between the networkD3 and d3treeR, below is a reproducible example: library(shiny) library(plotly) library(networkD3) library(treemap) library(d3treeR) ui <- fluidPage( plotlyOutput("p"), forceNetworkOutput("o"), d3treeOutput("a") )
server <- function(input, output, session) {
output$p <- renderPlotly({ ds <- data.frame(labels = c("A", "B", "C"), values = c(10, 40, 60)) plot_ly(ds, labels = ~labels, values = ~values) %>% add_pie() %>% layout(title = "Basic Pie Chart using Plotly") })
output$o <- renderForceNetwork({ forceNetwork(Links = MisLinks, Nodes = MisNodes, Source = "source", Target = "target", Value = "value", NodeID = "name", Group = "group", opacity = 0.4, zoom = TRUE)
})
output$a <- renderD3tree({ data(GNI2014)
tm <- treemap( GNI2014, index=c("continent", "iso3"), vSize="population", vColor="GNI", type="value" )
d3tree( tm,rootname = "World" ) })
}
shinyApp(ui, server)