mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Move methods to separate module
This commit is contained in:
parent
079deb0faf
commit
bf6df6af86
3 changed files with 105 additions and 77 deletions
31
ui.R
31
ui.R
|
|
@ -3,6 +3,8 @@ library(plotly)
|
|||
library(rclipboard)
|
||||
library(shiny)
|
||||
|
||||
source("methods.R")
|
||||
|
||||
ui <- fluidPage(
|
||||
shinyjs::useShinyjs(),
|
||||
rclipboardSetup(),
|
||||
|
|
@ -29,34 +31,7 @@ ui <- fluidPage(
|
|||
step = 1,
|
||||
value = 50
|
||||
),
|
||||
h3("Methods"),
|
||||
actionButton(
|
||||
"optimize_button",
|
||||
"Find optimal weights",
|
||||
icon = icon("check-double")
|
||||
),
|
||||
div(style = "margin-top: 16px"),
|
||||
lapply(methods, function(method) {
|
||||
verticalLayout(
|
||||
checkboxInput(
|
||||
method$id,
|
||||
span(
|
||||
method$description,
|
||||
style = "font-weight: bold"
|
||||
),
|
||||
value = TRUE
|
||||
),
|
||||
sliderInput(
|
||||
sprintf("%s_weight", method$id),
|
||||
NULL,
|
||||
post = "%",
|
||||
min = 0,
|
||||
max = 100,
|
||||
step = 1,
|
||||
value = 100
|
||||
)
|
||||
)
|
||||
})
|
||||
methods_ui("methods")
|
||||
),
|
||||
mainPanel(
|
||||
tabsetPanel(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue