Skip to content

Commit f39c62f

Browse files
committed
✨ update modules
1 parent 57b135b commit f39c62f

File tree

5 files changed

+49
-14
lines changed

5 files changed

+49
-14
lines changed

R/fct_meta.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ plot_meta_permutations <- function(rv,
899899
overlaps_with_threshold =
900900
(error_lci <= rv$error_threshold &
901901
error_uci >= -rv$error_threshold),
902-
status = dplyr::case_when(
902+
color = dplyr::case_when(
903903
within_threshold ~ "Yes",
904904
!within_threshold & overlaps_with_threshold ~ "Near",
905905
TRUE ~ "No"))
@@ -936,7 +936,7 @@ plot_meta_permutations <- function(rv,
936936
y = error,
937937
group = group,
938938
shape = group,
939-
color = status)) +
939+
color = color)) +
940940

941941
p_error1 +
942942
p_error2 +

R/mod_comp_m.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mod_comp_m_ui <- function(id) {
4949

5050
# shinyWidgets::autonumericInput(
5151
# inputId = ns("nsims_iter"),
52-
# label = "Simulation steps:",
52+
# label = "Check every _ tags:",
5353
# currencySymbol = " tag(s)",
5454
# currencySymbolPlacement = "s",
5555
# decimalPlaces = 0,

R/mod_tab_data_upload.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,8 @@ mod_tab_data_upload_server <- function(id, rv) {
13951395
" of group(s): ", msg_danger(toString(bug_group))),
13961396
detail = "Try again with different groupings.")
13971397

1398+
rv$is_valid <- FALSE
1399+
13981400
shinybusy::remove_modal_spinner()
13991401

14001402
shinyalert::shinyalert(

R/mod_tab_report.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ mod_tab_report_server <- function(id, rv) {
15331533
txt_final <- span(
15341534
style = paste(css_mono, css_bold),
15351535
"The number of simulations appears",
1536-
wrap_none("sufficient",, color = pal$sea),
1536+
wrap_none("sufficient", color = pal$sea),
15371537
"to accurately estimate mean",
15381538
wrap_none(txt_target[[target]], end = ","),
15391539
txt_uncertainty)
@@ -1542,16 +1542,16 @@ mod_tab_report_server <- function(id, rv) {
15421542
txt_final <- span(
15431543
style = paste(css_mono, css_bold),
15441544
"The number of simulations appears",
1545-
wrap_none("insufficient",, color = pal$grn),
1546-
"to accurately estimate mean",
1545+
wrap_none("insufficient", color = pal$grn),
1546+
"to accurately estimate man",
15471547
wrap_none(txt_target[[target]], end = ","),
15481548
txt_uncertainty)
15491549
},
15501550
"No" = {
15511551
txt_final <- span(
15521552
style = paste(css_mono, css_bold),
15531553
"The number of simulations appears",
1554-
wrap_none("insufficient",, color = pal$dgr),
1554+
wrap_none("insufficient", color = pal$dgr),
15551555
"to accurately estimate mean",
15561556
wrap_none(txt_target[[target]], end = ","),
15571557
txt_uncertainty)

R/mod_viz.R

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -801,15 +801,33 @@ mod_viz_server <- function(id, rv) {
801801
name = "speed")), 1)
802802
}
803803
})
804-
}
804+
805+
} # end of if (!is.null(rv$fitList))
806+
807+
if (rv$grouped) {
808+
if (!is.null(rv$groups[[2]]))
809+
if (!is.null(rv$groups[[2]][["A"]]) &&
810+
!is.null(rv$groups[[2]][["B"]])) {
811+
812+
out_sum$group <- sapply(names(rv$datList), function(x)
813+
ifelse(x %in% rv$groups[[2]][["A"]], "A", "B"))
814+
}
815+
816+
} # end of if (rv$grouped)
805817

806818
is_selection <- "multiple"
807819
if (rv$which_meta == "none") {
808820
is_selection <- "single"
809821
if(length(id) > 1) id <- NULL
810822
}
811823

824+
if (rv$which_meta == "compare") {
825+
if (!is.null(rv$groups[[2]][["A"]]))
826+
out_sum <- dplyr::relocate(out_sum, group)
827+
}
828+
812829
if (anyNA(id)) id <- NULL
830+
813831
reactable::reactable(
814832
out_sum,
815833
onClick = "select",
@@ -822,22 +840,37 @@ mod_viz_server <- function(id, rv) {
822840
defaultSelected = id,
823841
defaultColDef =
824842
reactable::colDef(
825-
headerClass = "rtable_header", align = "left"),
843+
headerClass = "rtable_header",
844+
align = "left",
845+
minWidth = 120),
826846
columns = list(
827-
n = reactable::colDef(name = "n"),
847+
n = reactable::colDef(
848+
name = "n",
849+
minWidth = 60,
850+
style = format_num,
851+
format = reactable::colFormat(
852+
separators = TRUE, locale = "en-US", digits = 0)),
853+
mod = if ("mod" %in% names(out_sum)) {
854+
reactable::colDef(
855+
minWidth = 80, name = "Model:") },
856+
group = if (rv$grouped) {
857+
reactable::colDef(
858+
name = "Group:",
859+
minWidth = 80) },
828860
longitude = reactable::colDef(
829861
format = reactable::colFormat(digits = 3)),
830862
latitude = reactable::colDef(
831863
format = reactable::colFormat(digits = 3)),
832-
N1 = if ("N_area" %in% names(out_sum)) {
864+
N_area = if ("N_area" %in% names(out_sum)) {
833865
reactable::colDef(
834-
minWidth = 80, name = "N (area)",
866+
minWidth = 90, name = "N (area)",
835867
style = format_num,
836868
format = reactable::colFormat(separators = TRUE,
837869
digits = 1)) },
838-
N2 = if ("N_speed" %in% names(out_sum)) {
870+
N_speed = if ("N_speed" %in% names(out_sum)) {
839871
reactable::colDef(
840-
minWidth = 80, name = "N (speed)",
872+
name = "N (speed)",
873+
minWidth = 90,
841874
style = format_num,
842875
format = reactable::colFormat(separators = TRUE,
843876
digits = 1)) }

0 commit comments

Comments
 (0)