library(shiny)
Your Shiny Application
The application must include the following: 1. Some form of input (widget: textbox, radio button, checkbox, …) 2. Some operation on the ui input in sever.R 3. Some reactive output displayed as a result of server calculations 4. You must also include enough documentation so that a novice user could use your application. 5. The documentation should be at the Shiny website itself. Do not post to an external link.
ui <- fluidPage(
titlePanel("Hello Shiny!"),
sidebarLayout(
sidebarPanel(
sliderInput(inputId = "bins",
label = "Number of bins:",
min = 1,
max = 50,
value = 30)
),
mainPanel(
plotOutput(outputId = "distPlot")
)
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
x <- faithful$waiting
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = "#75AADB", border = "white",
xlab = "Waiting time to next eruption (in mins)",
main = "Histogram of waiting times")
})
}
This is how you create a simple R Presentation in Rstudio PowerPoint foramt.