R shiny passing reactive to selectInput choices

You need to use renderUI on the server side for dynamic UIs. Here is a minimal example. Note that the second drop-down menu is reactive and adjusts to the dataset you choose in the first one. The code should be self-explanatory if you have dealt with shiny before. runApp(list( ui = bootstrapPage( selectInput(‘dataset’, ‘Choose Dataset’, … Read more

Embedding Image in Shiny App

I found another option that looks good for this app, so I’m sharing for others who want the image in the mainPanel. mainPanel( img(src=”https://stackoverflow.com/questions/21996887/myImage.png”, align = “right”), ### the rest of your code ) Save the file in a www directory in the shinyApp directory: | shinyApp/ | ui.R | server.R | www/ | myImage.png

Starting Shiny app after password input

EDIT 2019: We can now use the package shinymanager to do this: the invactivity script is to timeout the login page after 2 mins of inactivity so you dont waste resources: library(shiny) library(shinymanager) inactivity <- “function idleTimer() { var t = setTimeout(logout, 120000); window.onmousemove = resetTimer; // catches mouse movements window.onmousedown = resetTimer; // catches … Read more

How to convert a Shiny app consisting of multiple files into an easily shareable and reproducible Shiny example?

Example data Of course, all guidelines regarding sample data mentioned in the answer on the question “how to make a great R reproducible example” also hold when creating questions related to Shiny. To summarize: Make sure no additional files are needed to run your code. Use sample datasets like mtcars, or create some sample data … Read more