luminophorProxy: Create a LuminophoR proxy object

Description Usage Arguments Value See Also Examples

View source: R/luminophor.R

Description

Create a LuminophoR proxy object, which can then be chained to any of the API functions available (e.g. addWidget).

Usage

1
luminophorProxy(id, session = shiny::getDefaultReactiveDomain())

Arguments

id

Name of the LuminophoR htmlwidget

session

Valid session object

Value

Proxy LuminophoR object

See Also

luminophor

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
if (interactive()) {
  library(shiny)
  library(luminophor)
  shinyApp(
    ui = fluidPage(
      sidebarLayout(
        sidebarPanel(
          actionButton('add', 'Add Widgets', icon = icon('plus'))
        ),
        mainPanel(
          luminophorOutput('lmo', height='90vh')
        )
      )
    ),
    server = function(input, output) {
      output$lmo <- renderLuminophor(
        luminophor()
      )

      observeEvent(input$add, {
        luminophorProxy('lmo') %>%
          addWidget("mywidget")
      })
    }
  )
}

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