diff --git a/R/data_extract_module.R b/R/data_extract_module.R index e21cd242..19707e68 100644 --- a/R/data_extract_module.R +++ b/R/data_extract_module.R @@ -457,7 +457,7 @@ data_extract_srv.list <- function(id, datasets, data_extract_spec, join_keys = N # get keys out of join_keys if (!is.null(join_keys)) { - keys <- sapply(names(datasets), simplify = FALSE, function(x) join_keys$get(x, x)) + keys <- sapply(names(datasets), simplify = FALSE, function(x) join_keys[x, x]) } else { keys <- sapply(names(datasets), simplify = FALSE, function(x) character(0)) } diff --git a/R/get_merge_call.R b/R/get_merge_call.R index 35230eec..1b22ed1d 100644 --- a/R/get_merge_call.R +++ b/R/get_merge_call.R @@ -130,7 +130,7 @@ get_merge_key_grid <- function(selector_list, join_keys = teal.data::join_keys() get_merge_key_pair( selector_from, selector_to, - join_keys$get(selector_from$dataname, selector_to$dataname) + join_keys[selector_from$dataname, selector_to$dataname] ) } ) diff --git a/R/merge_datasets.R b/R/merge_datasets.R index 83199d70..3ff60973 100644 --- a/R/merge_datasets.R +++ b/R/merge_datasets.R @@ -278,7 +278,7 @@ are_needed_keys_provided <- function(join_keys, merged_selector_list) { } do_join_keys_exist <- function(dataset_name1, dataset_name2, join_keys) { - length(join_keys$get(dataset_name1, dataset_name2) > 0) + length(join_keys[dataset_name1, dataset_name2] > 0) } datasets_names <- vapply(merged_selector_list, function(slice) slice[["dataname"]], FUN.VALUE = character(1)) diff --git a/tests/testthat/test-merge_expression_srv.R b/tests/testthat/test-merge_expression_srv.R index e4d4057a..13212421 100644 --- a/tests/testthat/test-merge_expression_srv.R +++ b/tests/testthat/test-merge_expression_srv.R @@ -20,7 +20,7 @@ adsl_data_extract_srv_output <- dataname = "ADSL", filters = NULL, select = "AGE", - keys = join_keys$get("ADSL", "ADSL"), + keys = join_keys["ADSL", "ADSL"], reshape = FALSE, internal_id = "adsl_extract" ) @@ -30,7 +30,7 @@ adlb_data_extract_srv_output <- dataname = "ADLB", filters = NULL, select = c("AVAL", "CHG"), - keys = join_keys$get("ADLB", "ADLB"), + keys = join_keys["ADLB", "ADLB"], reshape = FALSE, internal_id = "adlb_extract" )