bioconductor v3.9.0 InteractiveDisplayBase

The interactiveDisplayBase package contains the the basic

Link to this section Summary

Functions

Run a shiny app, capturing results to the R session

display: Open a Shiny application for a Bioconductor object

Link to this section Functions

Run a shiny app, capturing results to the R session

Description

This utility function launches a shiny visualization application, either in the RStudio viewer pane (if run under RStudio) or in the browser.

Usage

.runApp(app, ...)

Arguments

ArgumentDescription
appThe shiny application definition, see ?shiny::runApp .
...additional arguments passed to shiny::runApp() .

Value

The return value of shiny::runApp .

Author

Martin Morgan

Examples

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)
}
Link to this function

interactiveDisplayBase_methods()

display: Open a Shiny application for a Bioconductor object

Description

This opens a shiny visualization application in the browser based on the submitted object.

Usage

display(object, ...)

Arguments

ArgumentDescription
objectdata object to display
...additional arguments passed to methods; currently unused.

Value

Usually some variation of the initial input object, but it may be altered by the display widget (subset for example).

Seealso

http://bioconductor.org/packages/2.13/bioc/html/interactiveDisplayBase.html

Author

Shawn Balcome and Marc Carlson

Examples

if(interactive()) {

## draw a data.frame
display(mtcars)

## subset a data.frame:
mtcars2 <- display(mtcars)

}