README.md

shinyGold

shinyGold is an implementation of the Golden Layout javascript library in Shiny

Installation

Not yet!

Example

This is an example of how shinyGold will be implemented when fully released

library(shiny)
library(shinyGold)

ui <- goldenLayout()

server <- function(input, output, session) {
  output$distPlot <- renderPlot({

    x    <- faithful$waiting
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    hist(x, breaks = bins, col = "#75AADB", border = "white",
         xlab = "Waiting time to next eruption (in mins)",
         main = "Histogram of waiting times")

  })

  output$A <- renderUI({
    tagList(
      sliderInput(inputId = "bins",
                  label = "Number of bins:",
                  min = 1,
                  max = 50,
                  value = 30)
      )
  })

  output$B <- renderUI({
    tagList(
      plotOutput(outputId = "distPlot")
    )
  })
}

shinyApp(ui, server)




## basic example code


jshukle/shinyGold documentation built on May 26, 2019, 10:35 a.m.