Description Usage Arguments Examples
A shiny Module for displaying the number by type as colored boxes.
1 2 3 | mod_caseBoxes_ui(id)
mod_caseBoxes_server(input, output, session, counts, param)
|
id, input, output, session |
Internal parameters for shiny. |
counts |
Reactive expression yielding the named vector of cases by type. |
param |
type of measure: weight, temperature, length |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | if (interactive()) {
library(shiny)
ui <- fluidPage(
tagList(
babyApp:::mod_caseBoxes_ui("boxes")
)
)
server <- function(input, output, session) {
counts <- reactive({
# invalidateLater(2000)
stats::setNames(sample.int(1000, 3), c("mean_today", "mean_week", "mean_month"))
})
callModule(babyApp:::mod_caseBoxes_server, "boxes", counts = counts, param = "weight")
}
runApp(shinyApp(ui = ui, server = server), launch.browser = TRUE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.