LuminophoR-package: LuminophoR: HTMLWidget implementation of Lumino layout...

Description See Also Examples

Description

Lumino, previously known as PhosphorJS, provides a rich set of widgets, layouts, events, and data structures. These enable developers to construct advanced, production-quality, desktop-like web applications that would be otherwise impossible using CSS alone. See the Lumino library (https://github.com/jupyterlab/lumino) and PhosphorJS documentation (https://phosphorjs.github.io/) for more information.

See Also

luminophor, luminophorOutput

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
31
if (interactive()) {
  library(shiny)
  library(luminophor)
  shinyApp(
    ui = fluidPage(
      titlePanel("Old Faithful Geyser Data"),
      fluidRow(column(12, luminophorOutput('lmo', height='90vh')))
    ),
    server = function(input, output) {
      output$lmo <- renderLuminophor(
        luminophor() %>%
          addWidget("widget-slider",
                    title = "Slider",
                    ui = sliderInput("bins", "Number of bins:",
                                     min = 1, max = 50, value = 30)) %>%
          addWidget("widget-plot",
                    title = "Plot",
                    insertmode = "split-right",
                    refwidgetID = "widget-slider",
                    relsize = 0.75,
                    ui = plotOutput("distPlot"))
      )

      output$distPlot <- renderPlot({
        x <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)
        hist(x, breaks = bins, col = 'darkgray', border = 'white')
      })
    }
  )
}

serenity-r/luminophor documentation built on Oct. 28, 2020, 9:42 p.m.