Skip to content

Commit 6d8bfca

Browse files
committed
closes #1
Duplicated hist
1 parent e4093e9 commit 6d8bfca

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# shinyfaithful (development version)
22

3-
* Initial CRAN submission.
3+
* Duplicated histogram (#1).

R/app_server.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
#' @noRd
77
app_server <- function(input, output, session) {
88
# Your application server logic
9-
mod_faithful_hist_server("hist")
9+
mod_faithful_hist_server("hist-waiting", variable = "waiting")
10+
mod_faithful_hist_server("hist-eruptions", variable = "eruptions")
1011
}

R/app_ui.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ app_ui <- function(request) {
1111
# Your application UI logic
1212
fluidPage(
1313
h1("Old Faithful Geyser - Hist"),
14-
mod_faithful_hist_ui("hist")
14+
mod_faithful_hist_ui("hist-waiting"),
15+
mod_faithful_hist_ui("hist-eruptions")
1516
)
1617
)
1718
}

R/mod_faithful_hist.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ mod_faithful_hist_ui <- function(id) {
2828
}
2929

3030
#' @rdname mod_faithful_hist
31+
#' @param variable character column name of faithful data
3132
#'
3233
#' @import shiny
33-
mod_faithful_hist_server <- function(id){
34+
mod_faithful_hist_server <- function(id, variable){
3435
moduleServer( id, function(input, output, session){
3536
ns <- session$ns
3637
# generate bins based on input$bins from ui.R
37-
variable <- "waiting"
38+
# variable <- "waiting"
3839
x <- datasets::faithful[, variable, drop = FALSE]
3940
bins <- reactive(seq(min(x), max(x), length.out = input$bins + 1))
4041

man/mod_faithful_hist.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)