Shiny is an R package that makes it easy to build interactive web apps straight from R.

You can host

I highly recommend you to visit https://shiny.rstudio.com/ for the documentation and gallery.

Host

There are multiple way to host a shiny app.

First Shiny App

There are couple ways to create an shiny app (we are going to focus on RStudio).

Basic Struture

ui <- fluidPage(
  # controls the layout and content of the application
)


server <- function(input, output) {
  # controls the interaction, modify output based on user input
}

# run the application 
shinyApp(ui = ui, server = server)

We are going to use the tutorial in https://github.com/rstudio-education/shiny.rstudio.com-tutorial

Input and Output

Input
checkboxInput
dateInput
dateRangeInput
fileInput
numericInput
selectInput
varSelectInput
sliderInput
textInput
textAreaInput
passwordInput
Output Render
uiOutput renderUI
imageOutput renderImage
plotOutput renderPlot
tableOutput renderTable
dataTableOutput renderDataTable
textOutput/verbatimTextOutput renderText/renderPrint

Reactivity

Reactivity maybe the most challenging part of learning shiny!

Basic HTML elements

https://www.learn-html.org/en/Basic_Elements