I have an issue. I'd like to have an shiny app which could have two input widgets for numeric values. Let's calle them X and P. One lets user introduce a numeric figure and the other a percent variation. Both figures can be calculated using the other one.
P*C+C=X with C being for example 1000.
What I'd like to do is when user changes P then X changes and same in the other way around (user changes X and P changes) I know how to do this in one way but not in two ways. Anyone know how to solve this situation?
There are a few ways to do this, here is one way:
Yielding:
Not sure this is the best way, it occilates if you start out in a state that is inconsistent - need to think about how to suppress this.