Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shinyfaithful 1.0.0 #5

Merged
merged 3 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: shinyfaithful
Title: Shiny4 workshop pkg
Version: 0.0.0.9000
Version: 1.0.0
Authors@R: person('Guido', 'Maggio', email = '[email protected]', role = c('cre', 'aut'))
Description: Package used for the 4th course of the Series Intro to Shiny.
License: MIT + file LICENSE
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# shinyfaithful (development version)
# shinyfaithful 1.0.0

* Initial CRAN submission.
* Duplicated histogram (#1).
3 changes: 2 additions & 1 deletion R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
#' @noRd
app_server <- function(input, output, session) {
# Your application server logic
mod_faithful_hist_server("hist")
mod_faithful_hist_server("hist-waiting", variable = "waiting")
mod_faithful_hist_server("hist-eruptions", variable = "eruptions")
}
3 changes: 2 additions & 1 deletion R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ app_ui <- function(request) {
# Your application UI logic
fluidPage(
h1("Old Faithful Geyser - Hist"),
mod_faithful_hist_ui("hist")
mod_faithful_hist_ui("hist-waiting"),
mod_faithful_hist_ui("hist-eruptions")
)
)
}
Expand Down
5 changes: 3 additions & 2 deletions R/mod_faithful_hist.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ mod_faithful_hist_ui <- function(id) {
}

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

Expand Down
4 changes: 3 additions & 1 deletion man/mod_faithful_hist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.