Title: | Base package for enabling powerful shiny web displays of Bioconductor objects |
---|---|
Description: | The interactiveDisplayBase package contains the the basic methods needed to generate interactive Shiny based display methods for Bioconductor objects. |
Authors: | Bioconductor Package Maintainer [cre], Shawn Balcome [aut], Marc Carlson [ctb], Marcel Ramos [ctb] |
Maintainer: | Bioconductor Package Maintainer <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.45.0 |
Built: | 2024-11-29 06:25:31 UTC |
Source: | https://github.com/bioc/interactiveDisplayBase |
This utility function launches a shiny visualization application, either in the RStudio viewer pane (if run under RStudio) or in the browser.
.runApp(app, ...)
.runApp(app, ...)
app |
The shiny application definition, see |
... |
additional arguments passed to |
The return value of shiny::runApp
.
Martin Morgan
if (interactive()) { require(shiny) app <- list( ui = fluidPage( title="Who Am I?", sidebarLayout( position="left", sidebarPanel( h1("Your name"), textInput("your_name", "Your name?", "Anonymous"), actionButton("done", "Done")), mainPanel( "Hi", textOutput("your_name", inline=TRUE)) )), server = function(input, output) { output$your_name <- renderText(input$your_name) observe({ if (input$done > 0) isolate(stopApp(returnValue = input$your_name)) }) }) .runApp(app) }
if (interactive()) { require(shiny) app <- list( ui = fluidPage( title="Who Am I?", sidebarLayout( position="left", sidebarPanel( h1("Your name"), textInput("your_name", "Your name?", "Anonymous"), actionButton("done", "Done")), mainPanel( "Hi", textOutput("your_name", inline=TRUE)) )), server = function(input, output) { output$your_name <- renderText(input$your_name) observe({ if (input$done > 0) isolate(stopApp(returnValue = input$your_name)) }) }) .runApp(app) }
This opens a shiny visualization application in the browser based on the submitted object.
display(object, ...)
display(object, ...)
object |
data object to display |
... |
additional arguments passed to methods; currently unused. |
Usually some variation of the initial input object, but it may be altered by the display widget (subset for example).
Shawn Balcome and Marc Carlson
http://bioconductor.org/packages/2.13/bioc/html/interactiveDisplayBase.html
if(interactive()) { ## draw a data.frame display(mtcars) ## subset a data.frame: mtcars2 <- display(mtcars) }
if(interactive()) { ## draw a data.frame display(mtcars) ## subset a data.frame: mtcars2 <- display(mtcars) }