load_jstools: load shinytools JavaScript functions

Description Usage Examples

View source: R/load_jstools.R

Description

load shinytools JavaScript functions in a shiny application. Operation has to be made in the UI part.

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Not run: 
library(shinytools)

if (interactive()) {
  options(device.ask.default = FALSE)

  # Define UI
  ui <- fluidPage(
    titlePanel("Hello dghiesse!"),
    load_jstools(),
    sidebarLayout(
      sidebarPanel(
        sliderInput( "obs",
          "Number of observations:",
          min = 0, max = 1000, value = 500)
      ),
      mainPanel(plotOutput("distPlot"))
    )
  )

  server <- function(input, output) {
    output$distPlot <- renderPlot({
      hist(rnorm(input$obs))
    })
  }

  print(shinyApp(ui, server))
}

## End(Not run)

ardata-fr/shinytools documentation built on Nov. 15, 2019, 7:53 p.m.