inst/hbcdtlfb/www/R/outputs/table_substance_period.R

# should match with delete_table_confirmed.R
output$table_substance_period <- renderDT({
  req(timevis_data_cal())
  
  datatable(
    timevis_data_cal() |> 
      filter(period %in% c("Pre-LMP", "Post-LMP", "Last Week", "Last Two Weeks Before Delivery"), 
             what == "Substance") |> 
      select(period, start, substance, frequency), 
    selection = "single",
    rownames = FALSE,
    escape = FALSE,
    colnames = c(
      "Period" = "period",
      "Date" = "start",
      "Substance" = "substance",
      "Frequency" = "frequency"
    ),
    filter = "top"
  )
})
ucsd-dsm/hbcd-tlfb documentation built on July 10, 2022, 5:46 p.m.