Shiny is an R package developed by RStudio that allows the creation of web pages to interactively display the results of an analysis in R.
There are two simple ways to create a Shiny app:
.R
file, orui.R
and server.R
.A Shiny app is divided into two parts:
library(shiny)
# Create the UI
ui <- shinyUI(fluidPage(
# Application title
titlePanel("Hello World!")
))
# Create the server function
server <- shinyServer(function(input, output){})
# Run the app
shinyApp(ui = ui, server = server)
ui.R
filelibrary(shiny)
# Define UI for application
shinyUI(fluidPage(
# Application title
titlePanel("Hello World!")
))
server.R
filelibrary(shiny)
# Define server logic
shinyServer(function(input, output){})