-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.R
60 lines (47 loc) · 2.02 KB
/
global.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
# Chapter 0. Load packages ----
library(shiny)
library(shinyWidgets)
library(bs4Dash)
library(plotly)
library(echarts4r)
library(shinyTime)
library(kableExtra)
library(DT)
library(imager)
library(scales)
library(shinyjs)
library(dygraphs)
library(shinyalert)
library(lattice)
library(shinycssloaders)
library(openxlsx)
# Chapter 1. Probability of default ----
pd_tab <- bs4TabItem(tabName = "pd",
fluidPage(
useShinyalert(),
useShinyjs(),
sidebarLayout(
position = "right",
sidebarPanel = sidebarPanel(
width = 2,
h6(icon("wrench"), strong("Customizations")),
hr(),
fileInput("pd_input", label = "Choose file", accept = c(".csv", ".xlsx")),
selectInput("delay", "Delay in defaults",
choices = c("No delay" = 1, "3 mons, 6 mons, 9 mons" = 2, "between one to twelve months" = 3 )
),
uiOutput("prob_bttn"),
numericInput("itr", "No of simulations", value = 1000, max = 10000, step = 500),
selectInput("bylvl", "Default rate level", choices = c("Monthly", "Yearly")),
sliderInput("prob", "probabilities", value = c(0,0.5,1), min = 0, max = 1)
),
mainPanel = mainPanel(width = 10,
)
)
))
# Chapter 2. Loss given default ----
lgd_tab <- bs4TabItem(tabName = "lgd")
# Chapter 3. Exposure at default ----
ead_tab <- bs4TabItem(tabName = "ead")
# Chapter 4. User guide
guide_tab <- bs4TabItem(tabName = "user_guide")