Skip to content

Commit

Permalink
chore: call get_join_keys with pkg namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Nov 8, 2023
1 parent c031262 commit b5a6470
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions R/tm_a_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,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(get_join_keys(data)$get(response[[i]]$dataname))
unlist(teal.data::get_join_keys(data)$get(response[[i]]$dataname))
)
}

Expand Down Expand Up @@ -324,7 +324,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 = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_merged_q <- reactive({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_a_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

regression_var <- reactive({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_association.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_merged_q <- reactive({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_bivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_merged_q <- reactive({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ srv_distribution <- function(id,
anl_merged_input <- teal.transform::merge_expression_srv(
selector_list = selector_list,
datasets = data,
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_merged_q <- reactive({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_merged_q <- reactive({
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_scatterplotmatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list
)

Expand Down
4 changes: 2 additions & 2 deletions R/tm_missing_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(get_join_keys(data)$get(dataname)[[dataname]])
data_keys <- reactive(teal.data::get_join_keys(data)$get(dataname)[[dataname]])

iv_r <- reactive({
iv <- shinyvalidate::InputValidator$new()
Expand Down Expand Up @@ -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 <- get_join_keys(data)$get(dataname)
keys <- teal.data::get_join_keys(data)$get(dataname)
if (parent_dataname %in% names(keys)) {
keys[[parent_dataname]]
} else {
Expand Down
4 changes: 2 additions & 2 deletions R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,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 = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

Expand Down Expand Up @@ -477,7 +477,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var,
},
env = list(
dataname = as.name(dataname_first),
join_keys = as.character(get_join_keys(data)$get(dataname_first)[[dataname_first]])
join_keys = as.character(teal.data::get_join_keys(data)$get(dataname_first)[[dataname_first]])
)
)
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_crosstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,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 = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = merge_function
)
Expand Down
6 changes: 3 additions & 3 deletions R/tm_variable_browser.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <- get_join_keys(data)
join_keys <- teal.data::get_join_keys(data)
if (!is.null(join_keys)) {
key <- get_join_keys(data)$get(dataset_name)[[dataset_name]]
key <- teal.data::get_join_keys(data)$get(dataset_name)[[dataset_name]]
} else {
key <- NULL
}
Expand Down Expand Up @@ -1222,7 +1222,7 @@ 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 <- get_join_keys(data)
join_keys <- teal.data::get_join_keys(data)
if (!is.null(join_keys)) {
icons[intersect(join_keys$get(dataset_name)[[dataset_name]], colnames(df))] <- "primary_key"
}
Expand Down

0 comments on commit b5a6470

Please sign in to comment.