Skip to content

Commit

Permalink
Revert square bracket@main (#553)
Browse files Browse the repository at this point in the history
reverted replace of square bracket by `get_var`. Problem with `get_var`
is as follows.
  • Loading branch information
gogonzo authored Aug 3, 2023
1 parent ef442f2 commit 907aa7f
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion R/tm_a_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl
})

plot_r <- reactive({
teal.code::get_var(output_q(), "g")
output_q()[["g"]]
})

pws <- teal.widgets::plot_with_settings_srv(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_a_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,8 @@ srv_a_regression <- function(id,
})


fitted <- reactive(teal.code::get_var(output_q(), "fit"))
plot_r <- reactive(teal.code::get_var(output_q(), "g"))
fitted <- reactive(output_q()[["fit"]])
plot_r <- reactive(output_q()[["g"]])

# Insert the plot into a plot_with_settings module from teal.widgets
pws <- teal.widgets::plot_with_settings_srv(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_association.R
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ srv_tm_g_association <- function(id,

plot_r <- shiny::reactive({
shiny::req(iv_r()$is_valid())
teal.code::get_var(output_q(), "p")
output_q()[["p"]]
})

pws <- teal.widgets::plot_with_settings_srv(
Expand All @@ -440,7 +440,7 @@ srv_tm_g_association <- function(id,
)

output$title <- renderText({
teal.code::get_var(output_q(), "title")
teal.code::dev_suppress(output_q()[["title"]])
})

teal.widgets::verbatim_popup_srv(
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 @@ -594,7 +594,7 @@ srv_g_bivariate <- function(id,
})

plot_r <- shiny::reactive({
teal.code::get_var(output_q(), "p")
output_q()[["p"]]
})

pws <- teal.widgets::plot_with_settings_srv(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -1168,9 +1168,9 @@ srv_distribution <- function(id,
qenv_final
})

dist_r <- reactive(teal.code::get_var(dist_q(), "g"))
dist_r <- reactive(dist_q()[["g"]])

qq_r <- reactive(teal.code::get_var(qq_q(), "g"))
qq_r <- reactive(qq_q()[["g"]])

output$summary_table <- DT::renderDataTable(
expr = if (iv_r()$is_valid()) common_q()[["summary_table"]] else NULL,
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 @@ -451,7 +451,7 @@ srv_g_response <- function(id,
teal.code::eval_code(qenv, plot_call)
})

plot_r <- reactive(teal.code::get_var(output_q(), "p"))
plot_r <- reactive(output_q()[["p"]])

# Insert the plot into a plot_with_settings module from teal.widgets
pws <- teal.widgets::plot_with_settings_srv(
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ srv_g_scatterplot <- function(id,
teal.code::eval_code(quote(print(p)))
})

plot_r <- reactive(teal.code::get_var(output_q(), "p"))
plot_r <- reactive(output_q()[["p"]])

# Insert the plot into a plot_with_settings module from teal.widgets
pws <- teal.widgets::plot_with_settings_srv(
Expand All @@ -911,7 +911,7 @@ srv_g_scatterplot <- function(id,
validate(need(!input$add_density, "Brushing feature is currently not supported when plot has marginal density"))
}

merged_data <- isolate(teal.code::get_var(output_q(), "ANL"))
merged_data <- isolate(output_q()[["ANL"]])

brushed_df <- teal.widgets::clean_brushedPoints(merged_data, plot_brush)
numeric_cols <- names(brushed_df)[
Expand Down
6 changes: 3 additions & 3 deletions R/tm_missing_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par
)
})

summary_plot_r <- reactive(teal.code::get_var(summary_plot_q(), "g"))
summary_plot_r <- reactive(summary_plot_q()[["g"]])

combination_cutoff_q <- reactive({
req(common_code_q())
Expand Down Expand Up @@ -938,7 +938,7 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par
)
})

combination_plot_r <- reactive(teal.code::get_var(combination_plot_q(), "g"))
combination_plot_r <- reactive(combination_plot_q()[["g"]])

summary_table_q <- reactive({
req(
Expand Down Expand Up @@ -1129,7 +1129,7 @@ srv_missing_data <- function(id, data, reporter, filter_panel_api, dataname, par
)
})

by_subject_plot_r <- reactive(teal.code::get_var(by_subject_plot_q(), "g"))
by_subject_plot_r <- reactive(by_subject_plot_q()[["g"]])

output$levels_table <- DT::renderDataTable(
expr = {
Expand Down
6 changes: 3 additions & 3 deletions R/tm_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -900,15 +900,15 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var,

boxplot_r <- reactive({
teal::validate_inputs(iv_r())
teal.code::get_var(boxplot_q(), "g")
boxplot_q()[["g"]]
})
density_plot_r <- reactive({
teal::validate_inputs(iv_r())
teal.code::get_var(density_plot_q(), "g")
density_plot_q()[["g"]]
})
cumulative_plot_r <- reactive({
teal::validate_inputs(iv_r())
teal.code::get_var(cumulative_plot_q(), "g")
cumulative_plot_q()[["g"]]
})

box_pws <- teal.widgets::plot_with_settings_srv(
Expand Down

0 comments on commit 907aa7f

Please sign in to comment.