From the course: Building Data Apps with R and Shiny: Essential Training

Unlock the full course today

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

Creating a simple Shiny app from scratch

Creating a simple Shiny app from scratch

From the course: Building Data Apps with R and Shiny: Essential Training

Start my 1-month free trial

Creating a simple Shiny app from scratch

- We're going to build a split-file Shiny app together. To do that, let's start in our Exercise Files and navigate to Folder 03_01, and we'll open up our RStudio project. Now, first, let's open our ui.R file, so we can see what kind of UX we're working with and we can see, right now, we simply have a fluidPage, so one page, shown here. Let's open up our server.R file and see what we have. We have the minimum requirement for our Shiny app to work at Shiny server function. And now let's also open up curve-plot.R. This script file contains just one line using the function curve. I want to run this, so we can see what it does, so I'll run the first line of curve-plot.R and what I get sent to my plot tab is a really nice plot of X to the power of two, or X squared. We're going to build into our Shiny app the ability to change the value of the exponent in this function with a slider. So let's insert the slider into the ui of our app before we move any further. So I go over to ui.R, and…

Contents