luminophorOutput: Helper functions for using Lumino in Shiny

Description Usage Arguments Examples

View source: R/luminophor.R

Description

These two functions are like most fooOutput() and renderFoo() functions in the shiny package. The former is used to create an html container for a Lumino dock panel, and the latter is used in the server logic to render the Lumino dock panel.

Usage

1
2
3
luminophorOutput(outputId, width = "100%", height = "auto")

renderLuminophor(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

ID of htmlwidgets container

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

expr

An expression to create a Lumino dock htmlwidget (normally via luminophor()).

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
if (interactive()) {
  library(shiny)
  library(luminophor)
  shinyApp(
    ui = fluidPage(
      fluidRow(column(12, luminophorOutput('lmo', height='90vh')))
    ),
    server = function(input, output) {
      output$lmo <- renderLuminophor(
        luminophor() %>%
          addWidget("mywidget")
      )
    }
  )
}

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