R/efficiencyAnalysisPage.R

Defines functions efficiencyAnalysisPage efficiencyAnalysisPageUI

efficiencyAnalysisPageUI <- function(id) {
  ns <- shiny::NS(id)
  tagList(
    fluidRow(
      box(width = 6, plotOutput(outputId = ns("activity_plot"))),
      box(width = 6, plotOutput(outputId = ns("duration_hist")))
      )
    )
}

efficiencyAnalysisPage <- function(input, output, session, df) {
  output$activity_plot <- shiny::renderPlot({
    df() %>% plot_class_duration()
  })

  output$duration_hist <- shiny::renderPlot({
    df() %>% plot_time_hist()
  })
}
altairwei/wiztimebook documentation built on June 1, 2021, 4:22 p.m.