From the course: Creating Interactive Presentations with Shiny and R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reactive expressions

Reactive expressions

From the course: Creating Interactive Presentations with Shiny and R

Start my 1-month free trial

Reactive expressions

- [Voiceover] Reactive Expressions are necessary when you want to control the evaluation order within a Shiny app, when you want to stop an expression being updated until you've used a specific controller. So, let's have a look at our exercises, to see how Reactive Expressions are used. If we go to RStudio, enter the top right-hand corner, and select Project, Open Project, and navigate to our Exercise Files on our Desktop, and we're in 04_05. We'll open up our Project file, and I've saved this in such a state, but you have two R Markdown presentations open. I don't need the environment over here, so I'm just gonna collapse this. And I also don't need a console, so I'll make this smaller. So, what do we have in our first file? Well, we have a slidy presentation and a shiny runtime. And if we scroll down to line 24, we can see we have a code chunk, which we've called interactive_histogram. We have here a Shiny app. We have a number of different slider Inputs. We can see that on line 41,…

Contents