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.
ui.R and server.R files
From the course: Creating Interactive Presentations with Shiny and R
ui.R and server.R files
- [Voiceover] It's time we talked a little bit more about the UIM server components of shiny apps in some more detail. When building shiny apps, there are two options available to you, so-called self-contained shinyApps, using the shinyApp function that can easily be added directly into code chunks within Rmarkdown files, and split-file Shiny Apps, which separate out the UI and server components into separate files. Now in the exercise files, there's a project which demonstrates how to separate out a shiny app into two files. Let's go over to our studio and have a look at that. So in our studio, we go to the top right-hand corner to Project, go to Open Project, and we'll navigate to our exercise files on the desktop. And we'll go down to 06_02 and open up our project file. When you open up the project file, there are three files which are open for you, 06_02.R, which contains a shinyApp, and then theres a server.R and a ui.R file as well. So I don't need to see the console right now…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.