How To Build GUI’s Using R! (Shiny R Tutorial)
Welcome Back! One thing I love about R is that you can actually build full fledged data apps within it, we use a package within R called Shiny to get this done! Let’s get started!
Perquisites:
First off, make sure to have R installed on your machine, if you don’t, follow this tutorial I made which will show you exactly how to do so. Next up, let’s install the shiny package by going into our R console and typing in “install.packages(shiny):
Awesome, we’re ready to start!
Let’s actually get started now!
With Shiny, there are 3 main components to a GUI: a UI object, a server function and a call to the shiny app. This is taken from the Shiny R website but it really helps visualize what this GUI code entails:
Trust me, it really is this basic, but obviously the more functional it gets the more complex it gets as well. The ShinyApp code line will pretty much always stay the same, but the UI and Server functions are always changing.
Now, think about it like this, the UI function will display everything to the GUI, where the…