1. 学习
  2. /
  3. 课程
  4. /
  5. Building Web Applications with Shiny in R

Connected

练习

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.

说明

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