-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.R
62 lines (55 loc) · 1.62 KB
/
app.R
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#=============================================================================#
# File Name: app.R
# Original Creator: Kim To
# Contact Information: ICE-support@niehs.nih.gov
# Date Created: 2021-12-03
# Last Modified: 2024-10-27
# License: MIT
# Version: 1.0
# Description: Loads required packages. Reads in functions. Loads UI and
# server files to build app.
#=============================================================================#
# Load packages
require(data.table)
require(DT)
require(ggplot2)
require(grid)
require(gridExtra)
require(openxlsx)
require(plotly)
require(readxl)
require(shiny)
require(shinyBS)
require(shinyjqui)
require(shinyjs)
# Load functions
source("R/dass_predict.R")
source("R/interpret_assay.R")
source("R/utils.R")
# Load ui from file
source("R/ui_obj.R")
options(DT.TOJSON_ARGS = list(na = 'string'))
ui <- fluidPage(
useShinyjs(),
# Set CSS styles
tags$head(
HTML("<title>NICEATM DASS App</title>"),
tags$link(rel = "stylesheet", type = "text/css", href = "styles.css")),
htmltools::findDependencies(selectizeInput("foo", "bar", choices = "a")),
htmltools::findDependencies(icon("box", lib = "font-awesome")),
ui_dass,
tags$footer(
tags$script(src = "js.js")
)
)
attr(ui, "lang") <- "en"
# Read in server files
server <- function(input, output, session) {
source("R/server/Step2-UploadData.R", local = TRUE)
source("R/server/Step3-SelectColumns.R", local = TRUE)
source("R/server/Step4-ReviewColumns.R", local = TRUE)
source("R/server/Step5-Results.R", local = TRUE)
source("R/server/Step6-Performance.R", local = TRUE)
}
# Create App -----
shinyApp(ui = ui, server = server)