0byt3m1n1
Path:
C:
/
Program Files
/
RStudio
/
resources
/
app
/
resources
/
templates
/
[
Home
]
File: shiny.qmd
## Shiny Documents This Quarto document is made interactive using Shiny. Interactive documents allow readers to modify parameters and see the results immediately. Learn more about Shiny interactive documents at <https://quarto.org/docs/interactive/shiny/>. ## Inputs and Outputs You can embed Shiny inputs and outputs in your document. Outputs are automatically updated whenever inputs change. This demonstrates how a standard R plot can be made interactive: ```{r} sliderInput("bins", "Number of bins:", min = 1, max = 50, value = 30) plotOutput("distPlot") ``` ```{r} #| context: server output$distPlot <- renderPlot({ x <- faithful[, 2] # Old Faithful Geyser data bins <- seq(min(x), max(x), length.out = input$bins + 1) hist(x, breaks = bins, col = 'darkgray', border = 'white', xlab = 'Waiting time to next eruption (in mins)', main = 'Histogram of waiting times') }) ```