mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-05 04:05:06 -05:00
36 lines
396 B
R
36 lines
396 B
R
library(shiny)
|
|
|
|
badfunc <- function() {
|
|
stop("boom")
|
|
}
|
|
|
|
A <- reactive({
|
|
badfunc()
|
|
})
|
|
|
|
B <- reactive({
|
|
A()
|
|
})
|
|
|
|
C <- reactive({
|
|
B()
|
|
})
|
|
|
|
ui <- fluidPage(
|
|
textOutput("foo"),
|
|
dataTableOutput("bar")
|
|
)
|
|
|
|
server <- function(input, output, session) {
|
|
session$onFlushed(stopApp)
|
|
|
|
output$foo <- renderText({
|
|
C()
|
|
})
|
|
output$bar <- renderDataTable({
|
|
C()
|
|
})
|
|
}
|
|
|
|
shinyApp(ui, server)
|