file_summary: UI for the file summary module

file_summary_uiR Documentation

UI for the file summary module

Description

Creates the UI for the file summary module, complete with a drop-down selection box, and two tabs, one for a file overview and one for file details.

Gives functionality to the file summary UI, populating the drop-down menu with available files to choose from, and showing both an overview and detailed summary of a chosen file.

Usage

file_summary_ui(id)

file_summary_server(input, output, session, file_data)

Arguments

id

the id

input

the input variables from shiny::callModule()

output

the output variables from shiny::callModule()

session

the session from shiny::callModule()

file_data

a reactive, named list of file data in data frames or tibbles

Value

html UI for file summary

Examples

library("shiny")
library("shinydashboard")

server <- function(input, output) {
  # Create some simple file dataa
  data <- reactive({
    list(
      "individual" = data.frame(
        individualID = c("a", "b", "c"),
        age = c(23, 24, 24),
        stringsAsFactors = FALSE
      ),
      "biospecimen" = data.frame(
        individualID = c("a", "b", "c"),
        specimenID = c("a1", "b1", "c1"),
        isReal = c(FALSE, FALSE, FALSE),
        stringsAsFactors = FALSE
      )
    )
  })
  # Show file summary
  callModule(file_summary_server, "summary", file_data = data)
}

ui <- function(request) {
  dashboardPage(
    header = dashboardHeader(),
    sidebar = dashboardSidebar(),
    body = dashboardBody(
      includeCSS(
        system.file("app/www/custom.css", package = "dccvalidator")
      ),
      file_summary_ui("summary")
    )
  )
}
## Not run: 
shinyApp(ui, server)

## End(Not run)

Sage-Bionetworks/dccvalidator documentation built on May 7, 2022, 10:32 a.m.