Skip to content

Commit

Permalink
replace [[ i ]][[ j ]] to [i, j]
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo committed Nov 17, 2023
1 parent a6c82d4 commit 143e218
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/data_extract_module.R
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ 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[[x]][[x]])
if (length(join_keys)) {
keys <- sapply(names(datasets), simplify = FALSE, function(x) join_keys[x, x])
} else {
keys <- sapply(names(datasets), simplify = FALSE, function(x) character(0))
}
Expand Down
2 changes: 1 addition & 1 deletion R/get_merge_call.R
Original file line number Diff line number Diff line change
Expand Up @@ -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[[selector_from$dataname]][[selector_to$dataname]]
join_keys[selector_from$dataname, selector_to$dataname]
)
}
)
Expand Down
2 changes: 1 addition & 1 deletion R/merge_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,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[[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))
Expand Down

0 comments on commit 143e218

Please sign in to comment.