diff --git a/courses/04-interactivite.html b/courses/04-interactivite.html index af6506b..4c83caf 100644 --- a/courses/04-interactivite.html +++ b/courses/04-interactivite.html @@ -99,8 +99,8 @@ iris %>% ggplotly(plot) ``` -
- + + --- @@ -113,8 +113,8 @@ ggplotly(plot) ggplotly ``` - - + + --- @@ -129,8 +129,8 @@ iris %>% ggplotly(plot) ``` - - + + --- class:center, middle @@ -177,8 +177,8 @@ iris %>% y = ~Sepal.Width) ``` - - + + --- @@ -192,8 +192,8 @@ iris %>% mode = "markers") ``` - - + + --- @@ -210,8 +210,8 @@ iris %>% "Largeur de sépale :", Sepal.Width)) ``` - - + + --- @@ -226,8 +226,8 @@ iris %>% --- class:center, middle - - + + --- @@ -327,8 +327,12 @@ https://shiny.rstudio.com/ ui <- fluidPage(titlePanel = "Titre", sidebarLayout( sidebarPanel( - sliderInput(inputId = "bins", label = "Bins", - min = 1, max = 50, value = 30)), + sliderInput(inputId = "bins", + label = "Bins", + min = 1, + max = 50, + value = 30, + animate = animationOptions(interval = 100))), mainPanel(plotOutput(outputId = "figure")))) ``` @@ -352,11 +356,14 @@ ui <- fluidPage(titlePanel = "Titre", ```r server <- function(input, output, session) { + set.seed(1234) + normale <- tibble(val = rnorm(1000)) + output$figure <- renderPlot( { - mtcars %>% + normale %>% ggplot() + - aes(x = mpg) + + aes(x = val) + geom_histogram(bins = input$bins) }) }