Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. ---
  2. title: "test"
  3. author: ""
  4. date: "24 January 2017"
  5. output: ioslides_presentation
  6. runtime: shiny
  7. ---
  8.  
  9. ```{r setup, include=FALSE}
  10. knitr::opts_chunk$set(echo = FALSE)
  11. ```
  12.  
  13. ## Shiny Presentation
  14.  
  15. This R Markdown presentation is made interactive using Shiny. The viewers of the presentation can change the assumptions underlying what's presented and see the results immediately.
  16.  
  17. To learn more, see [Interactive Documents](http://rmarkdown.rstudio.com/authoring_shiny.html).
  18.  
  19. ## Interactive Plot
  20.  
  21. ```{r eruptions}
  22. inputPanel(
  23. selectInput("n_breaks", label = "Number of bins:",
  24. choices = c(10, 20, 35, 50), selected = 20),
  25.  
  26. sliderInput("bw_adjust", label = "Bandwidth adjustment:",
  27. min = 0.2, max = 2, value = 1, step = 0.2)
  28. )
  29.  
  30. renderPlot({
  31. hist(faithful$eruptions, probability = TRUE, breaks = as.numeric(input$n_breaks),
  32. xlab = "Duration (minutes)", main = "Geyser eruption duration")
  33.  
  34. dens <- density(faithful$eruptions, adjust = input$bw_adjust)
  35. lines(dens, col = "blue")
  36. })
  37. ```
  38.  
  39. ## Bullets
  40.  
  41. - Bullet 1
  42. - Bullet 2
  43. - Bullet 3
  44.  
  45. ## R Output
  46.  
  47. ```{r cars}
  48. summary(cars)
  49. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement