Ollaws
Ollaws

Reputation: 167

R: display mode for single-file shiny app

When using two files (ui.R and server.R), one can change display mode with:

runApp("MyApp", display.mode = "showcase")

How can I set display mode to "showcase" for single-file shiny app?

Thx!

Upvotes: 3

Views: 1775

Answers (2)

cirofdo
cirofdo

Reputation: 1074

What about now?

runApp(display.mode = 'showcase',

  list(
  ui=shinyUI(fluidPage(
    numericInput('n', 'Number of obs', 100),
    plotOutput('plot')
  )), 

  server= shinyServer(function(input, output) {
    output$plot <- renderPlot({ hist(runif(input$n)) })
  })

))

Upvotes: 1

Ollaws
Ollaws

Reputation: 167

Display mode can be changed using DESCRIPTION file.

Details answered in this question: showcase display mode for published app in shinyapps.io

Upvotes: 2

Related Questions