Session Ready
Exercise

Add a reactive expression

A reactive expression is an R expression that uses widget input and returns a value. The reactive expression will update this value whenever the original widget changes. Reactive expressions are lazy and cached.

In this exercise, you will encapsulate a repeated computation as a reactive expression.

Instructions
100 XP
  • Add a reactive expression called rval_bmi to calculate BMI.
  • Use this reactive expression to replace BMI calculations in both outputs.