Description Usage Arguments Value Examples
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.
1 2 3 | file_summary_ui(id)
file_summary_server(input, output, session, file_data)
|
id |
the id |
input |
the input variables from |
output |
the output variables from |
session |
the session from |
file_data |
a reactive, named list of file data in data frames or tibbles |
html UI for file summary
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.