Relative Content

Tag Archive for rshiny

All Plots in tabsetPanel in RShiny reset to most recent set

I am working on a project that will allow the user to specify certain inputs and then generate some tables and plots. The user selects some options and various outputs are generated. I want to allow the user to modify the inputs and then easily compare the outputs from the various ‘runs’.

Is there a way to refer to elements of a vector input in a conditional panel in R shiny

I want to refer to a specific element of a vector input in a conditional panel. For instance, suppose the user gets a checkbox group input with two fruit options- Apple and Banana. If the user selects only Apple and not Banana, a conditional panel is created that further prompts the user to select the color of the Apple (Red or green). If the user instead selects only Banana, a separate conditional panel is created that asks for the color of the Banana (green or yellow). I tried doing this with input.fruit.includes() as a condition, but this fails. Is there any other way to do this in R shiny? More generally, how do I put in a condition that asks for a specific element to be contained in a vector. Thanks!

Storing checkbox values for output in Shiny

I was trying to get a sense for how checkbox group input values can be stored in R shiny. I want to condition on them on the server side. Let’s say my goal is the following- the user gets to check one to three fruits (Apple, Orange, Banana). Subsequently, based on the input, the app prints outputs. If ‘Apple’ is included in the input, it prints ‘Apples are great!’. Otherwise it prints ‘Please include an apple daily’.