问题
I have a Shiny app in R with several inputs (drop-downs and sliders). Initially they all have default values for when the app opens, using the "selected" parameter.
But, i'm wondering if there is way to dynamically change the default value based on a certain input field.
Example, if I have one input field that is a drop-down of countries and then I have one slider input of price for a pint of beer. As a default "Ireland" is selected from the countries list and the slider is defaulted to €5.00. Now what I want is if I select "Poland" from the countries list the slider would then change to €2.00.
Is this possible and how?
Thanks,
Mike
来源:https://stackoverflow.com/questions/39567951/can-i-make-input-fields-dynamically-change-in-shiny-based-on-other-inputs