-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* green locally * prefix chunks calls * fix styler/lints * styler * remove teal.transform from dependencies [skip audit] [skip gitleaks] [skip pii-check] [skip bioccheck] [skip r-cmd] [skip spelling] [skip licenses] [skip linter] [skip style] [skip docs] [skip validation] [skip release] [skip roxygen] [skip links] [skip coverage] [skip version]
- Loading branch information
Showing
18 changed files
with
200 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
^man-roxygen$ | ||
^Meta$ | ||
^outputdir$ | ||
^\.pre-commit-config\.yaml$ | ||
^scratch$ | ||
^stubs$ | ||
^temp$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,14 +36,13 @@ | |
#' @param dot_size plot dot size. | ||
#' @param alpha numeric vector to define transparency of plotted points. | ||
#' | ||
#' @inheritParams teal.devel::standard_layout | ||
#' @inheritParams teal.widgets::standard_layout | ||
#' | ||
#' @import DescTools | ||
#' @import utils | ||
#' @import dplyr | ||
#' @import goshawk | ||
#' @import teal | ||
#' @import teal.devel | ||
#' | ||
#' @author Jeff Tomlinson (tomlinsj) [email protected] | ||
#' @author Balazs Toth (tothb2) [email protected] | ||
|
@@ -272,10 +271,10 @@ ui_g_boxplot <- function(id, ...) { | |
ns <- NS(id) | ||
a <- list(...) | ||
|
||
standard_layout( | ||
teal.widgets::standard_layout( | ||
output = div( | ||
fluidRow( | ||
plot_with_settings_ui(id = ns("boxplot")) | ||
teal.widgets::plot_with_settings_ui(id = ns("boxplot")) | ||
), | ||
fluidRow(column( | ||
width = 12, | ||
|
@@ -292,7 +291,7 @@ ui_g_boxplot <- function(id, ...) { | |
), | ||
encoding = div( | ||
templ_ui_dataname(a$dataname), | ||
optionalSelectInput( | ||
teal.widgets::optionalSelectInput( | ||
ns("trt_group"), | ||
label = "Select Treatment Variable", | ||
choices = a$trt_group$choices, | ||
|
@@ -309,7 +308,7 @@ ui_g_boxplot <- function(id, ...) { | |
ychoices = a$yaxis_var$choices, | ||
yselected = a$yaxis_var$selected | ||
), | ||
optionalSelectInput( | ||
teal.widgets::optionalSelectInput( | ||
ns("facet_var"), | ||
label = "Facet by", | ||
choices = a$facet_var$choices, | ||
|
@@ -318,7 +317,7 @@ ui_g_boxplot <- function(id, ...) { | |
), | ||
templ_ui_constraint(ns, label = "Data Constraint"), # required by constr_anl_chunks | ||
if (length(a$hline_vars) > 0) { | ||
optionalSelectInput( | ||
teal.widgets::optionalSelectInput( | ||
ns("hline_vars"), | ||
label = "Add Horizontal Range Line(s):", | ||
choices = a$hline_vars, | ||
|
@@ -327,8 +326,8 @@ ui_g_boxplot <- function(id, ...) { | |
) | ||
}, | ||
ui_arbitrary_lines(id = ns("hline_arb"), a$hline_arb, a$hline_arb_label, a$hline_arb_color), | ||
panel_group( | ||
panel_item( | ||
teal.widgets::panel_group( | ||
teal.widgets::panel_item( | ||
title = "Plot Aesthetic Settings", | ||
toggle_slider_ui( | ||
ns("yrange_scale"), | ||
|
@@ -341,11 +340,11 @@ ui_g_boxplot <- function(id, ...) { | |
checkboxInput(ns("loq_legend"), "Display LoQ Legend", a$loq_legend), | ||
checkboxInput(ns("rotate_xlab"), "Rotate X-axis Label", a$rotate_xlab) | ||
), | ||
panel_item( | ||
teal.widgets::panel_item( | ||
title = "Plot settings", | ||
optionalSliderInputValMinMax(ns("font_size"), "Font Size", a$font_size, ticks = FALSE), | ||
optionalSliderInputValMinMax(ns("dot_size"), "Dot Size", a$dot_size, ticks = FALSE), | ||
optionalSliderInputValMinMax(ns("alpha"), "Dot Alpha", a$alpha, ticks = FALSE) | ||
teal.widgets::optionalSliderInputValMinMax(ns("font_size"), "Font Size", a$font_size, ticks = FALSE), | ||
teal.widgets::optionalSliderInputValMinMax(ns("dot_size"), "Dot Size", a$dot_size, ticks = FALSE), | ||
teal.widgets::optionalSliderInputValMinMax(ns("alpha"), "Dot Alpha", a$alpha, ticks = FALSE) | ||
) | ||
) | ||
), | ||
|
@@ -369,7 +368,7 @@ srv_g_boxplot <- function(id, | |
hline_vars_colors, | ||
hline_vars_labels) { | ||
moduleServer(id, function(input, output, session) { | ||
init_chunks() | ||
teal.code::init_chunks() | ||
|
||
# reused in all modules | ||
anl_chunks <- constr_anl_chunks( | ||
|
@@ -447,7 +446,7 @@ srv_g_boxplot <- function(id, | |
sprintf("You can not choose %s as x-axis variable for treatment variable %s.", xaxis, trt_group) | ||
)) | ||
|
||
chunks_push( | ||
teal.code::chunks_push( | ||
chunks = private_chunks, | ||
id = "boxplot", | ||
expression = bquote({ | ||
|
@@ -478,7 +477,7 @@ srv_g_boxplot <- function(id, | |
}) | ||
) | ||
|
||
chunks_safe_eval(private_chunks) | ||
teal.code::chunks_safe_eval(private_chunks) | ||
|
||
private_chunks | ||
}) | ||
|
@@ -491,7 +490,7 @@ srv_g_boxplot <- function(id, | |
font_size <- input$font_size | ||
trt_group <- input$trt_group | ||
|
||
chunks_push( | ||
teal.code::chunks_push( | ||
chunks = private_chunks, | ||
id = "table", | ||
expression = bquote({ | ||
|
@@ -506,31 +505,31 @@ srv_g_boxplot <- function(id, | |
}) | ||
) | ||
|
||
chunks_safe_eval(private_chunks) | ||
teal.code::chunks_safe_eval(private_chunks) | ||
private_chunks | ||
}) | ||
|
||
main_code <- reactive({ | ||
private_chunks <- create_table() | ||
chunks_push( | ||
teal.code::chunks_push( | ||
chunks = private_chunks, | ||
id = "output", | ||
expression = quote(print(p)) | ||
) | ||
|
||
chunks_safe_eval(private_chunks) | ||
teal.code::chunks_safe_eval(private_chunks) | ||
|
||
chunks_reset() | ||
chunks_push_chunks(private_chunks) | ||
teal.code::chunks_reset() | ||
teal.code::chunks_push_chunks(private_chunks) | ||
|
||
private_chunks | ||
}) | ||
|
||
plot_r <- reactive({ | ||
chunks_get_var("p", main_code()) | ||
teal.code::chunks_get_var("p", main_code()) | ||
}) | ||
|
||
boxplot_data <- plot_with_settings_srv( | ||
boxplot_data <- teal.widgets::plot_with_settings_srv( | ||
id = "boxplot", | ||
plot_r = plot_r, | ||
height = plot_height, | ||
|
@@ -539,7 +538,7 @@ srv_g_boxplot <- function(id, | |
) | ||
|
||
output$table_ui <- DT::renderDataTable({ | ||
tbl <- chunks_get_var("tbl", main_code()) | ||
tbl <- teal.code::chunks_get_var("tbl", main_code()) | ||
|
||
numeric_cols <- setdiff(names(select_if(tbl, is.numeric)), "n") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.