From 15b6756cc1f0fda9e34eaacd1b04e91cf25c2ad5 Mon Sep 17 00:00:00 2001 From: vedhav Date: Wed, 8 Nov 2023 19:21:52 +0530 Subject: [PATCH] chore: make join_key related changes to the modules --- R/tm_a_pca.R | 7 +++---- R/tm_a_regression.R | 4 ++-- R/tm_data_table.R | 2 +- R/tm_front_page.R | 2 +- R/tm_g_association.R | 4 ++-- R/tm_g_bivariate.R | 4 ++-- R/tm_g_distribution.R | 4 ++-- R/tm_g_response.R | 4 ++-- R/tm_g_scatterplot.R | 4 ++-- R/tm_g_scatterplotmatrix.R | 4 ++-- R/tm_missing_data.R | 6 +++--- R/tm_outliers.R | 7 +++---- R/tm_t_crosstable.R | 5 ++--- R/tm_variable_browser.R | 10 +++++----- man/tm_a_pca.Rd | 3 +-- man/tm_a_regression.Rd | 2 +- man/tm_data_table.Rd | 2 +- man/tm_front_page.Rd | 2 +- man/tm_g_association.Rd | 2 +- man/tm_g_bivariate.Rd | 2 +- man/tm_g_distribution.Rd | 2 +- man/tm_g_response.Rd | 2 +- man/tm_g_scatterplot.Rd | 2 +- man/tm_g_scatterplotmatrix.Rd | 2 +- man/tm_missing_data.Rd | 2 +- man/tm_outliers.Rd | 3 +-- man/tm_t_crosstable.Rd | 3 +-- man/tm_variable_browser.Rd | 2 +- vignettes/teal-modules-general.Rmd | 4 ++-- vignettes/using-association-plot.Rmd | 6 ++---- vignettes/using-bivariate-plot.Rmd | 6 ++---- vignettes/using-cross-table.Rmd | 2 +- vignettes/using-data-table.Rmd | 2 +- vignettes/using-outliers-module.Rmd | 2 +- vignettes/using-regression-plots.Rmd | 6 ++---- vignettes/using-response-plot.Rmd | 6 ++---- vignettes/using-scatterplot-matrix.Rmd | 6 ++---- vignettes/using-scatterplot.Rmd | 6 ++---- 38 files changed, 63 insertions(+), 81 deletions(-) diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index e888a1d1c..3795d74d9 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -31,7 +31,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' app <- teal::init( #' data = data, #' modules = teal::modules( @@ -57,7 +57,6 @@ #' if (interactive()) { #' shinyApp(app$ui, app$server) #' } -#' tm_a_pca <- function(label = "Principal Component Analysis", dat, plot_height = c(600, 200, 2000), @@ -258,7 +257,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl response[[i]]$select$choices <- var_labels(data[[response[[i]]$dataname]]()) response[[i]]$select$choices <- setdiff( response[[i]]$select$choices, - unlist(teal.data::get_join_keys(data)$get(response[[i]]$dataname)) + unlist(join_keys(data)[[response[[i]]$dataname]]) ) } @@ -324,7 +323,7 @@ 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::get_join_keys(data) + join_keys = join_keys(data) ) anl_merged_q <- reactive({ diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 9688d14c3..3351de116 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -41,7 +41,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -295,7 +295,7 @@ srv_a_regression <- function(id, anl_merged_input <- teal.transform::merge_expression_srv( selector_list = selector_list, datasets = data, - join_keys = teal.data::get_join_keys(data) + join_keys = join_keys(data) ) regression_var <- reactive({ diff --git a/R/tm_data_table.R b/R/tm_data_table.R index 70b0b4e62..cc14cf816 100644 --- a/R/tm_data_table.R +++ b/R/tm_data_table.R @@ -32,7 +32,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, diff --git a/R/tm_front_page.R b/R/tm_front_page.R index 1d0c9580e..5d21635b8 100644 --- a/R/tm_front_page.R +++ b/R/tm_front_page.R @@ -24,7 +24,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' table_1 <- data.frame(Info = c("A", "B"), Text = c("A", "B")) #' table_2 <- data.frame(`Column 1` = c("C", "D"), `Column 2` = c(5.5, 6.6), `Column 3` = c("A", "B")) diff --git a/R/tm_g_association.R b/R/tm_g_association.R index f91175748..6c4a29351 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -32,7 +32,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -251,7 +251,7 @@ srv_tm_g_association <- function(id, anl_merged_input <- teal.transform::merge_expression_srv( datasets = data, selector_list = selector_list, - join_keys = teal.data::get_join_keys(data) + join_keys = join_keys(data) ) anl_merged_q <- reactive({ diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 39453c210..da3ca2dda 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -52,7 +52,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -441,7 +441,7 @@ srv_g_bivariate <- function(id, anl_merged_input <- teal.transform::merge_expression_srv( selector_list = selector_list, datasets = data, - join_keys = teal.data::get_join_keys(data) + join_keys = join_keys(data) ) anl_merged_q <- reactive({ diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 4efd3f82f..4190aeff5 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -61,7 +61,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' vars1 <- choices_selected( #' variable_choices(data[["ADSL"]], c("ARM", "COUNTRY", "SEX")), @@ -447,7 +447,7 @@ srv_distribution <- function(id, anl_merged_input <- teal.transform::merge_expression_srv( selector_list = selector_list, datasets = data, - join_keys = teal.data::get_join_keys(data) + join_keys = join_keys(data) ) anl_merged_q <- reactive({ diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 295951c60..03526eee1 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -34,7 +34,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = teal.data::cdisc_data( @@ -278,7 +278,7 @@ srv_g_response <- function(id, anl_merged_input <- teal.transform::merge_expression_srv( selector_list = selector_list, datasets = data, - join_keys = teal.data::get_join_keys(data) + join_keys = join_keys(data) ) anl_merged_q <- reactive({ diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 3fb5b1308..f962fc4d0 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -44,7 +44,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -471,7 +471,7 @@ srv_g_scatterplot <- function(id, anl_merged_input <- teal.transform::merge_expression_srv( selector_list = selector_list, datasets = data, - join_keys = teal.data::get_join_keys(data), + join_keys = join_keys(data), merge_function = "dplyr::inner_join" ) diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index e77b33004..f9c93f0da 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -27,7 +27,7 @@ #' }) #' datanames <- c("ADSL", "ADRS") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -180,7 +180,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab anl_merged_input <- teal.transform::merge_expression_srv( datasets = data, - join_keys = teal.data::get_join_keys(data), + join_keys = join_keys(data), selector_list = selector_list ) diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index 39e38d442..1edce3cca 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -25,7 +25,7 @@ #' }) #' datanames <- c("ADSL", "ADRS") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -356,7 +356,7 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par moduleServer(id, function(input, output, session) { prev_group_by_var <- reactiveVal("") data_r <- data[[dataname]] - data_keys <- reactive(teal.data::get_join_keys(data)$get(dataname)[[dataname]]) + data_keys <- reactive(unlist(join_keys(data)[[dataname]])) iv_r <- reactive({ iv <- shinyvalidate::InputValidator$new() @@ -395,7 +395,7 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par data_parent_keys <- reactive({ if (length(parent_dataname) > 0 && parent_dataname %in% names(data)) { - keys <- teal.data::get_join_keys(data)$get(dataname) + keys <- teal.data::join_keys(data)[[dataname]] if (parent_dataname %in% names(keys)) { keys[[parent_dataname]] } else { diff --git a/R/tm_outliers.R b/R/tm_outliers.R index 8ca3ab8fa..7ca78aa53 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -23,7 +23,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' fact_vars_adsl <- names(Filter(isTRUE, sapply(data[["ADSL"]], is.factor))) #' vars <- choices_selected(variable_choices(data[["ADSL"]], fact_vars_adsl)) @@ -66,7 +66,6 @@ #' if (interactive()) { #' shinyApp(app$ui, app$server) #' } -#' tm_outliers <- function(label = "Outliers Module", outlier_var, categorical_var = NULL, @@ -294,7 +293,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, anl_merged_input <- teal.transform::merge_expression_srv( selector_list = reactive_select_input, datasets = data, - join_keys = teal.data::get_join_keys(data), + join_keys = join_keys(data), merge_function = "dplyr::inner_join" ) @@ -477,7 +476,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, }, env = list( dataname = as.name(dataname_first), - join_keys = as.character(teal.data::get_join_keys(data)$get(dataname_first)[[dataname_first]]) + join_keys = as.character(join_keys(data)[[dataname_first]][[dataname_first]]) ) ) ) diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index bc69309b9..b226f101a 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -29,7 +29,7 @@ #' }) #' datanames <- c("ADSL") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = teal.data::cdisc_data( @@ -75,7 +75,6 @@ #' if (interactive()) { #' shinyApp(app$ui, app$server) #' } -#' tm_t_crosstable <- function(label = "Cross Table", x, y, @@ -219,7 +218,7 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, anl_merged_input <- teal.transform::merge_expression_srv( datasets = data, - join_keys = teal.data::get_join_keys(data), + join_keys = join_keys(data), selector_list = selector_list, merge_function = merge_function ) diff --git a/R/tm_variable_browser.R b/R/tm_variable_browser.R index 192030347..045ff75f9 100644 --- a/R/tm_variable_browser.R +++ b/R/tm_variable_browser.R @@ -38,7 +38,7 @@ #' }) #' datanames <- c("ADSL", "ADTTE") #' datanames(data) <- datanames -#' data@join_keys <- cdisc_join_keys(!!!datanames) +#' join_keys(data) <- cdisc_join_keys(!!!datanames) #' #' app <- teal::init( #' data = data, @@ -1149,9 +1149,9 @@ render_tab_header <- function(dataset_name, output, data) { dataset_ui_id <- paste0("dataset_summary_", dataset_name) output[[dataset_ui_id]] <- renderText({ df <- data[[dataset_name]]() - join_keys <- teal.data::get_join_keys(data) + join_keys <- join_keys(data) if (!is.null(join_keys)) { - key <- teal.data::get_join_keys(data)$get(dataset_name)[[dataset_name]] + key <- join_keys(data)[[dataset_name]][[dataset_name]] } else { key <- NULL } @@ -1222,9 +1222,9 @@ render_tab_table <- function(dataset_name, parent_dataname, output, data, input, # get icons proper for the data types icons <- stats::setNames(teal.slice:::variable_types(df), colnames(df)) - join_keys <- teal.data::get_join_keys(data) + join_keys <- join_keys(data) if (!is.null(join_keys)) { - icons[intersect(join_keys$get(dataset_name)[[dataset_name]], colnames(df))] <- "primary_key" + icons[intersect(join_keys[[dataset_name]][[dataset_name]], colnames(df))] <- "primary_key" } icons <- variable_type_icons(icons) diff --git a/man/tm_a_pca.Rd b/man/tm_a_pca.Rd index 4264be4e6..a0ba0a7c3 100644 --- a/man/tm_a_pca.Rd +++ b/man/tm_a_pca.Rd @@ -80,7 +80,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, modules = teal::modules( @@ -106,5 +106,4 @@ app <- teal::init( if (interactive()) { shinyApp(app$ui, app$server) } - } diff --git a/man/tm_a_regression.Rd b/man/tm_a_regression.Rd index f11861f0d..5355f6547 100644 --- a/man/tm_a_regression.Rd +++ b/man/tm_a_regression.Rd @@ -94,7 +94,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_data_table.Rd b/man/tm_data_table.Rd index 0d1aa525f..4e267bc81 100644 --- a/man/tm_data_table.Rd +++ b/man/tm_data_table.Rd @@ -61,7 +61,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_front_page.Rd b/man/tm_front_page.Rd index 567738f7d..029433282 100644 --- a/man/tm_front_page.Rd +++ b/man/tm_front_page.Rd @@ -47,7 +47,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) table_1 <- data.frame(Info = c("A", "B"), Text = c("A", "B")) table_2 <- data.frame(`Column 1` = c("C", "D"), `Column 2` = c(5.5, 6.6), `Column 3` = c("A", "B")) diff --git a/man/tm_g_association.Rd b/man/tm_g_association.Rd index 17551dc3c..a8948878c 100644 --- a/man/tm_g_association.Rd +++ b/man/tm_g_association.Rd @@ -78,7 +78,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_g_bivariate.Rd b/man/tm_g_bivariate.Rd index 055c3804a..9d23e2390 100644 --- a/man/tm_g_bivariate.Rd +++ b/man/tm_g_bivariate.Rd @@ -120,7 +120,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_g_distribution.Rd b/man/tm_g_distribution.Rd index bdf26d7cf..0d59da12f 100644 --- a/man/tm_g_distribution.Rd +++ b/man/tm_g_distribution.Rd @@ -105,7 +105,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) vars1 <- choices_selected( variable_choices(data[["ADSL"]], c("ARM", "COUNTRY", "SEX")), diff --git a/man/tm_g_response.Rd b/man/tm_g_response.Rd index 569f1b650..4118ef880 100644 --- a/man/tm_g_response.Rd +++ b/man/tm_g_response.Rd @@ -93,7 +93,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = teal.data::cdisc_data( diff --git a/man/tm_g_scatterplot.Rd b/man/tm_g_scatterplot.Rd index 820992973..2b9c5e63f 100644 --- a/man/tm_g_scatterplot.Rd +++ b/man/tm_g_scatterplot.Rd @@ -107,7 +107,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_g_scatterplotmatrix.Rd b/man/tm_g_scatterplotmatrix.Rd index 7eb858ab0..fe3d04d05 100644 --- a/man/tm_g_scatterplotmatrix.Rd +++ b/man/tm_g_scatterplotmatrix.Rd @@ -52,7 +52,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADRS") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_missing_data.Rd b/man/tm_missing_data.Rd index 354a8dd0d..8091314b5 100644 --- a/man/tm_missing_data.Rd +++ b/man/tm_missing_data.Rd @@ -62,7 +62,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADRS") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/man/tm_outliers.Rd b/man/tm_outliers.Rd index 1c084a5a7..a2c2f7d22 100644 --- a/man/tm_outliers.Rd +++ b/man/tm_outliers.Rd @@ -62,7 +62,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) fact_vars_adsl <- names(Filter(isTRUE, sapply(data[["ADSL"]], is.factor))) vars <- choices_selected(variable_choices(data[["ADSL"]], fact_vars_adsl)) @@ -105,5 +105,4 @@ app <- teal::init( if (interactive()) { shinyApp(app$ui, app$server) } - } diff --git a/man/tm_t_crosstable.Rd b/man/tm_t_crosstable.Rd index 94a8555b4..6379c9589 100644 --- a/man/tm_t_crosstable.Rd +++ b/man/tm_t_crosstable.Rd @@ -61,7 +61,7 @@ data <- within(data, { }) datanames <- c("ADSL") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = teal.data::cdisc_data( @@ -107,5 +107,4 @@ app <- teal::init( if (interactive()) { shinyApp(app$ui, app$server) } - } diff --git a/man/tm_variable_browser.Rd b/man/tm_variable_browser.Rd index 90dcf2f47..b2ca42891 100644 --- a/man/tm_variable_browser.Rd +++ b/man/tm_variable_browser.Rd @@ -63,7 +63,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADTTE") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) app <- teal::init( data = data, diff --git a/vignettes/teal-modules-general.Rmd b/vignettes/teal-modules-general.Rmd index e8a645bb0..49fc8ed56 100644 --- a/vignettes/teal-modules-general.Rmd +++ b/vignettes/teal-modules-general.Rmd @@ -51,7 +51,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADTTE") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) # nolint end app <- teal::init( @@ -93,7 +93,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADTTE") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) # nolint end ``` diff --git a/vignettes/using-association-plot.Rmd b/vignettes/using-association-plot.Rmd index 823625feb..c3f9b1989 100644 --- a/vignettes/using-association-plot.Rmd +++ b/vignettes/using-association-plot.Rmd @@ -78,10 +78,8 @@ data <- within(data, { }) datanames <- c("ADSL", "ADSL2", "ADRS", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) -data@join_keys$mutate( - "ADSL2", "ADSL", get_cdisc_keys("ADSL") -) +join_keys(data) <- cdisc_join_keys(!!!datanames) +join_keys(data)["ADSL2"] <- get_cdisc_keys("ADSL") # nolint end app <- teal::init( diff --git a/vignettes/using-bivariate-plot.Rmd b/vignettes/using-bivariate-plot.Rmd index 2a87d819d..d60217cb3 100644 --- a/vignettes/using-bivariate-plot.Rmd +++ b/vignettes/using-bivariate-plot.Rmd @@ -58,10 +58,8 @@ data <- within(data, { }) datanames <- c("ADSL", "ADSL2", "ADRS", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) -data@join_keys$mutate( - "ADSL2", "ADSL", get_cdisc_keys("ADSL") -) +join_keys(data) <- cdisc_join_keys(!!!datanames) +join_keys(data)["ADSL2"] <- get_cdisc_keys("ADSL") # nolint end ``` diff --git a/vignettes/using-cross-table.Rmd b/vignettes/using-cross-table.Rmd index 1d4c2c8eb..a4ec8afcc 100644 --- a/vignettes/using-cross-table.Rmd +++ b/vignettes/using-cross-table.Rmd @@ -48,7 +48,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) # nolint end ``` diff --git a/vignettes/using-data-table.Rmd b/vignettes/using-data-table.Rmd index 2fd724f2d..3722f5423 100644 --- a/vignettes/using-data-table.Rmd +++ b/vignettes/using-data-table.Rmd @@ -44,7 +44,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) # nolint end ``` diff --git a/vignettes/using-outliers-module.Rmd b/vignettes/using-outliers-module.Rmd index d2391c010..6969a5634 100644 --- a/vignettes/using-outliers-module.Rmd +++ b/vignettes/using-outliers-module.Rmd @@ -45,7 +45,7 @@ data <- within(data, { }) datanames <- c("ADSL", "ADRS", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) +join_keys(data) <- cdisc_join_keys(!!!datanames) # nolint end ``` diff --git a/vignettes/using-regression-plots.Rmd b/vignettes/using-regression-plots.Rmd index 415c670a3..b1436bb36 100644 --- a/vignettes/using-regression-plots.Rmd +++ b/vignettes/using-regression-plots.Rmd @@ -56,10 +56,8 @@ data <- within(data, { }) datanames <- c("ADSL", "ADSL2", "ADRS", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) -data@join_keys$mutate( - "ADSL2", "ADSL", get_cdisc_keys("ADSL") -) +join_keys(data) <- cdisc_join_keys(!!!datanames) +join_keys(data)["ADSL2"] <- get_cdisc_keys("ADSL") # nolint end ``` diff --git a/vignettes/using-response-plot.Rmd b/vignettes/using-response-plot.Rmd index 52a1a5e18..030cfa0a1 100644 --- a/vignettes/using-response-plot.Rmd +++ b/vignettes/using-response-plot.Rmd @@ -55,10 +55,8 @@ data <- within(data, { }) datanames <- c("ADSL", "ADSL2", "ADRS", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) -data@join_keys$mutate( - "ADSL2", "ADSL", get_cdisc_keys("ADSL") -) +join_keys(data) <- cdisc_join_keys(!!!datanames) +join_keys(data)["ADSL2"] <- get_cdisc_keys("ADSL") # nolint end ``` diff --git a/vignettes/using-scatterplot-matrix.Rmd b/vignettes/using-scatterplot-matrix.Rmd index e92a83cd5..a41f9ed46 100644 --- a/vignettes/using-scatterplot-matrix.Rmd +++ b/vignettes/using-scatterplot-matrix.Rmd @@ -56,10 +56,8 @@ data <- within(data, { }) datanames <- c("ADSL", "ADSL2", "ADRS", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) -data@join_keys$mutate( - "ADSL2", "ADSL", get_cdisc_keys("ADSL") -) +join_keys(data) <- cdisc_join_keys(!!!datanames) +join_keys(data)["ADSL2"] <- get_cdisc_keys("ADSL") # nolint end ``` diff --git a/vignettes/using-scatterplot.Rmd b/vignettes/using-scatterplot.Rmd index 1e174541c..69d950d84 100644 --- a/vignettes/using-scatterplot.Rmd +++ b/vignettes/using-scatterplot.Rmd @@ -56,10 +56,8 @@ data <- within(data, { }) datanames <- c("ADSL", "ADSL2", "ADRS", "ADTTE", "ADLB") datanames(data) <- datanames -data@join_keys <- cdisc_join_keys(!!!datanames) -data@join_keys$mutate( - "ADSL2", "ADSL", get_cdisc_keys("ADSL") -) +join_keys(data) <- cdisc_join_keys(!!!datanames) +join_keys(data)["ADSL2"] <- get_cdisc_keys("ADSL") # nolint end ```