From fa5386919083341305f211684d9b5dba5740d5a8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 22 Nov 2023 16:59:35 +0530 Subject: [PATCH 1/3] tdata to teal_data tm_a_pca --- R/tm_a_pca.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 692b32748..2de60683d 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -246,7 +246,8 @@ ui_a_pca <- function(id, ...) { srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, plot_width, ggplot2_args) { with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") - checkmate::assert_class(data, "tdata") + checkmate::assert_class(data, "reactive") + checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { response <- dat @@ -254,10 +255,10 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl response[[i]]$select$multiple <- FALSE response[[i]]$select$always_selected <- NULL response[[i]]$select$selected <- NULL - response[[i]]$select$choices <- var_labels(data[[response[[i]]$dataname]]()) + response[[i]]$select$choices <- var_labels(data()[[response[[i]]$dataname]]) response[[i]]$select$choices <- setdiff( response[[i]]$select$choices, - unlist(teal.data::join_keys(data)[[response[[i]]$dataname]]) + unlist(teal.data::join_keys(data())[[response[[i]]$dataname]]) ) } @@ -322,13 +323,12 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl anl_merged_input <- teal.transform::merge_expression_srv( selector_list = selector_list, - datasets = data, - join_keys = teal.data::join_keys(data) + datasets = data ) anl_merged_q <- reactive({ req(anl_merged_input()) - teal.code::new_qenv(tdata2env(data), code = get_code_tdata(data)) %>% + data() %>% teal.code::eval_code(as.expression(anl_merged_input()$expr)) }) From 05004b155477d6d212e0fbbe57e1378272761cd8 Mon Sep 17 00:00:00 2001 From: kartikeya kirar Date: Thu, 23 Nov 2023 10:40:53 +0530 Subject: [PATCH 2/3] Update R/tm_a_pca.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com> Signed-off-by: kartikeya kirar --- R/tm_a_pca.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 2de60683d..fae3a03ca 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -255,7 +255,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl response[[i]]$select$multiple <- FALSE response[[i]]$select$always_selected <- NULL response[[i]]$select$selected <- NULL - response[[i]]$select$choices <- var_labels(data()[[response[[i]]$dataname]]) + response[[i]]$select$choices <- var_labels(isolate(data())[[response[[i]]$dataname]]) response[[i]]$select$choices <- setdiff( response[[i]]$select$choices, unlist(teal.data::join_keys(data())[[response[[i]]$dataname]]) From b0b8757f02f57f291128d09f5bf596192931fe88 Mon Sep 17 00:00:00 2001 From: kartikeya kirar Date: Thu, 23 Nov 2023 10:41:02 +0530 Subject: [PATCH 3/3] Update R/tm_a_pca.R MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com> Signed-off-by: kartikeya kirar --- R/tm_a_pca.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index fae3a03ca..3b83939b6 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -258,7 +258,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl response[[i]]$select$choices <- var_labels(isolate(data())[[response[[i]]$dataname]]) response[[i]]$select$choices <- setdiff( response[[i]]$select$choices, - unlist(teal.data::join_keys(data())[[response[[i]]$dataname]]) + unlist(teal.data::join_keys(isolate(data()))[[response[[i]]$dataname]]) ) }