Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show only datasets used #1309

Merged
merged 9 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion R/tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ tm_g_barchart_simple <- function(x = NULL,
)

ui_args <- as.list(environment())

data_extract_list <- list(x = x, fill = fill,
x_facet = x_facet, y_facet = y_facet)

module(
label = label,
server = srv_g_barchart_simple,
Expand All @@ -204,7 +208,7 @@ tm_g_barchart_simple <- function(x = NULL,
ggplot2_args = ggplot2_args,
decorators = decorators
),
datanames = "all"
datanames = teal.transform::get_extract_datanames(data_extract_list)
)
}

Expand Down
11 changes: 10 additions & 1 deletion R/tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ tm_g_ci <- function(label,
checkmate::assert_class(y_var, classes = "data_extract_spec")
checkmate::assert_class(x_var, classes = "data_extract_spec")
checkmate::assert_class(color, classes = "data_extract_spec")
x_var <- teal.transform::list_extract_spec(x_var, allow_null = TRUE)
y_var <- teal.transform::list_extract_spec(y_var, allow_null = TRUE)
color <- teal.transform::list_extract_spec(color, allow_null = TRUE)
teal.transform::check_no_multiple_selection(x_var)
teal.transform::check_no_multiple_selection(y_var)
teal.transform::check_no_multiple_selection(color)
llrs-roche marked this conversation as resolved.
Show resolved Hide resolved

checkmate::assert_class(conf_level, "choices_selected")
checkmate::assert_numeric(plot_height, len = 3, any.missing = FALSE, finite = TRUE)
checkmate::assert_numeric(plot_height[1], lower = plot_height[2], upper = plot_height[3], .var.name = "plot_height")
Expand All @@ -306,6 +313,8 @@ tm_g_ci <- function(label,

args <- as.list(environment())

data_extract_list <- list(x_var = x_var, y_var = y_var, color = color)

module(
label = label,
server = srv_g_ci,
Expand All @@ -321,7 +330,7 @@ tm_g_ci <- function(label,
),
ui = ui_g_ci,
ui_args = args,
datanames = "all"
datanames = teal.transform::get_extract_datanames(data_extract_list)
)
}

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ select_decorators <- function(decorators, scope) {

#' Convert flat list of `teal_transform_module` to named lists
#'
#' @param decorators (list of `teal_transformodules`) to normalize.
#' @param decorators (list of `teal_transform_module`) to normalize.
#' @return A named list of lists with `teal_transform_module` objects.
#' @keywords internal
normalize_decorators <- function(decorators) {
Expand Down
2 changes: 1 addition & 1 deletion man/normalize_decorators.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions teal.modules.clinical.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 49921c94-1294-43d5-b84e-1d82b33146b1
llrs-roche marked this conversation as resolved.
Show resolved Hide resolved

RestoreWorkspace: No
SaveWorkspace: No
Expand Down
Loading