We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 179054e commit 001c187Copy full SHA for 001c187
inst/shiny/histogram.R
@@ -0,0 +1,26 @@
1
+# Histogram with variable classes
2
+
3
+ui <- fluidPage(
4
+ titlePanel("Choix des classes pour un histogramme"),
5
+ sidebarLayout(
6
+ sidebarPanel(
7
+ sliderInput(inputId = "bins", label = "Nombre de classes:",
8
+ min = 1, max = 50, value = 30)
9
+ ),
10
+ mainPanel(
11
+ plotOutput(outputId = "distPlot")
12
+ )
13
14
+)
15
16
+server <- function(input, output) {
17
+ output$distPlot <- renderPlot({
18
+ chart::chart(data = geyser, ~waiting) +
19
+ ggplot2::geom_histogram(bins = input$bins,
20
+ col = "white", fill = "#75AADB") +
21
+ ggplot2::ylab("Fréquence")
22
+ })
23
+}
24
25
+geyser <- data.io::read("geyser", package = "MASS", lang = "fr")
26
+shinyApp(ui, server)
0 commit comments