inst/examples/shiny/ui.R

library(shiny)
library(networkD3)

shinyUI(fluidPage(
  
  titlePanel("Shiny networkD3 "),
  
  sidebarLayout(
    sidebarPanel(
      numericInput("opacity", "Opacity", 0.6, min = 0.1, max = 1, step = .1)
    ),
    mainPanel(
      tabsetPanel(
        tabPanel("Simple Network", simpleNetworkOutput("simple")),
        tabPanel("Force Network", forceNetworkOutput("force")),
        tabPanel("Force Network with Legend & Radius", forceNetworkOutput("forceRadius")),
        tabPanel("Sankey Network", 
                 checkboxInput("sinksRight", "sinksRight", value = TRUE),
                 sankeyNetworkOutput("sankey")),
        tabPanel("Reingold-Tilford Tree", radialNetworkOutput("rt"))
      )
    )
  )
))

Try the networkD3 package in your browser

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

networkD3 documentation built on May 2, 2019, 2:37 a.m.