Skip to content

Commit 213e5e6

Browse files
committed
Remove MAIN_GRP references
1 parent 49f3eca commit 213e5e6

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

R/mod_boxplot.R

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ boxplot_UI <- function(id) { # nolint
115115

116116
group_menu <- drop_menu_helper(
117117
ns(BP$ID$GRP_BUTTON), BP$MSG$LABEL$GRP_BUTTON,
118-
col_menu_UI(id = ns(BP$ID$MAIN_GRP)),
118+
#col_menu_UI(id = ns(BP$ID$MAIN_GRP)),
119119
col_menu_UI(id = ns(BP$ID$SUB_GRP)),
120120
col_menu_UI(id = ns(BP$ID$PAGE_GRP))
121121
)
@@ -393,15 +393,15 @@ boxplot_server <- function(id,
393393
# input
394394

395395
inputs <- list()
396-
inputs[[BP$ID$MAIN_GRP]] <- col_menu_server(
397-
id = BP$ID$MAIN_GRP,
398-
data = v_group_dataset,
399-
label = "Select a grouping variable",
400-
include_func = function(x) {
401-
is.factor(x) || is.character(x)
402-
},
403-
default = default_main_group
404-
)
396+
# inputs[[BP$ID$MAIN_GRP]] <- col_menu_server(
397+
# id = BP$ID$MAIN_GRP,
398+
# data = v_group_dataset,
399+
# label = "Select a grouping variable",
400+
# include_func = function(x) {
401+
# is.factor(x) || is.character(x)
402+
# },
403+
# default = default_main_group
404+
# )
405405
inputs[[BP$ID$SUB_GRP]] <- col_menu_server(
406406
id = BP$ID$SUB_GRP,
407407
data = v_group_dataset,
@@ -534,13 +534,13 @@ boxplot_server <- function(id,
534534
param_iv$enable()
535535

536536
group_iv <- shinyvalidate::InputValidator$new()
537-
group_iv$add_rule(
538-
get_id(inputs[[BP$ID$MAIN_GRP]]),
539-
sv_not_empty(
540-
inputs[[BP$ID$MAIN_GRP]],
541-
msg = BP$MSG$VALIDATE$NO_MAIN_GROUP_SEL
542-
)
543-
)
537+
# group_iv$add_rule(
538+
# get_id(inputs[[BP$ID$MAIN_GRP]]),
539+
# sv_not_empty(
540+
# inputs[[BP$ID$MAIN_GRP]],
541+
# msg = BP$MSG$VALIDATE$NO_MAIN_GROUP_SEL
542+
# )
543+
# )
544544
group_iv$add_rule(
545545
get_id(inputs[[BP$ID$SUB_GRP]]),
546546
sv_not_empty(
@@ -588,8 +588,9 @@ boxplot_server <- function(id,
588588
)
589589
)
590590

591-
subset_inputs <- c(BP$ID$PAR, BP$ID$PAR_VISIT, BP$ID$X_VAR,
592-
BP$ID$PAR_VALUE, BP$ID$MAIN_GRP, BP$ID$SUB_GRP, BP$ID$PAGE_GRP)
591+
subset_inputs <- c(BP$ID$PAR, BP$ID$PAR_VISIT, BP$ID$X_VAR, BP$ID$PAR_VALUE,
592+
# BP$ID$MAIN_GRP,
593+
BP$ID$SUB_GRP, BP$ID$PAGE_GRP)
593594
if (!is.null(inputs[[BP$ID$ANLFL_FILTER]])) {
594595
subset_inputs <- c(subset_inputs, BP$ID$ANLFL_FILTER)
595596
}
@@ -622,8 +623,10 @@ boxplot_server <- function(id,
622623
l_inputs <- v_input_subset()
623624
group_vect <- drop_nones(
624625
stats::setNames(
625-
c(l_inputs[[BP$ID$MAIN_GRP]], l_inputs[[BP$ID$SUB_GRP]], l_inputs[[BP$ID$PAGE_GRP]]),
626-
c(CNT$MAIN_GROUP, CNT$SUB_GROUP, CNT$PAGE_GROUP)
626+
c(# l_inputs[[BP$ID$MAIN_GRP]],
627+
l_inputs[[BP$ID$SUB_GRP]], l_inputs[[BP$ID$PAGE_GRP]]),
628+
c(# CNT$MAIN_GROUP,
629+
CNT$SUB_GROUP, CNT$PAGE_GROUP)
627630
)
628631
)
629632

@@ -638,7 +641,6 @@ boxplot_server <- function(id,
638641
subj_col = VAR$SBJ,
639642
cat_col = VAR$CAT,
640643
par_col = VAR$PAR,
641-
#vis_col = VAR$VIS,
642644
vis_col = l_inputs[[BP$ID$X_VAR]],
643645
anlfl_col = l_inputs[[BP$ID$ANLFL_FILTER]]
644646
)
@@ -650,7 +652,7 @@ boxplot_server <- function(id,
650652
par = l_inputs[[BP$ID$PAR]][["par"]],
651653
par_value = l_inputs[[BP$ID$PAR_VALUE]],
652654
vis = l_inputs[[BP$ID$PAR_VISIT]],
653-
main_grp = l_inputs[[BP$ID$MAIN_GRP]],
655+
main_grp = NULL, # l_inputs[[BP$ID$MAIN_GRP]],
654656
sub_grp = l_inputs[[BP$ID$SUB_GRP]],
655657
page_grp = l_inputs[[BP$ID$PAGE_GRP]]
656658
)
@@ -785,7 +787,7 @@ boxplot_server <- function(id,
785787
)
786788

787789
shiny::observeEvent(loaded_state(), {
788-
get_update(inputs[[BP$ID$MAIN_GRP]])[["val"]](selected = loaded_state()[[BP$ID$MAIN_GRP]])
790+
# get_update(inputs[[BP$ID$MAIN_GRP]])[["val"]](selected = loaded_state()[[BP$ID$MAIN_GRP]])
789791
get_update(inputs[[BP$ID$SUB_GRP]])[["val"]](selected = loaded_state()[[BP$ID$SUB_GRP]])
790792
get_update(inputs[[BP$ID$PAGE_GRP]])[["val"]](selected = loaded_state()[[BP$ID$PAGE_GRP]])
791793
get_update(inputs[[BP$ID$PAR]])[["val"]](

0 commit comments

Comments
 (0)