#' visualise UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_visualise_ui <- function(id){
ns <- NS(id)
tagList(
fluidRow(
col_12(
h3("Timeline"),
col_6(
dateRangeInput(
ns("date"),
"Choose start and date",
min = min(blood_pressure_readings$Date),
max = max(blood_pressure_readings$Date),
start = min(blood_pressure_readings$Date),
end = max(blood_pressure_readings$Date)
)
),
col_6(
),
plotOutput(
ns("plot")
)
)
)
)
}
#' visualise Server Function
#'
#' @noRd
mod_visualise_server <- function(input, output, session){
ns <- session$ns
output$plot <- renderPlot({
filter_and_draw(
input$date[[1]],
input$date[[2]]
)
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.