Skip to content

Commit

Permalink
Merge branch 'main' into 289_xaxis_lab@main
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr authored Oct 11, 2024
2 parents 5a4ce41 + 55abf55 commit 84d111b
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 32 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: teal.goshawk
Title: Longitudinal Visualization `teal` Modules
Version: 0.2.0.9013
Date: 2024-10-09
Version: 0.2.0.9014
Date: 2024-10-10
Authors@R: c(
person("Nick", "Paszty", , "[email protected]", role = c("aut", "cre")),
person("Dawid", "Kaledkowski", , "[email protected]", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal.goshawk 0.2.0.9013
# teal.goshawk 0.2.0.9014

# teal.goshawk 0.2.0

Expand Down
22 changes: 11 additions & 11 deletions R/tm_g_gh_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ srv_g_boxplot <- function(id,
font_size = .(font_size),
unit = .("AVALU")
)
print(p)
})
)
}), 800)
Expand All @@ -479,6 +480,7 @@ srv_g_boxplot <- function(id,
xaxis_var = .(xaxis_var),
facet_var = .(facet_var)
)
tbl
})
)
}), 800)
Expand Down Expand Up @@ -507,6 +509,13 @@ srv_g_boxplot <- function(id,
DT::formatRound(numeric_cols, 4)
})

joined_qenvs <- reactive({
req(create_plot(), create_table())
teal.code::join(create_plot(), create_table())
})

code <- reactive(teal.code::get_code(joined_qenvs()))

### REPORTER
if (with_reporter) {
card_fun <- function(comment, label) {
Expand Down Expand Up @@ -535,11 +544,7 @@ srv_g_boxplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(
teal.code::get_code(
teal.code::join(create_plot(), create_table())
)
)
card$append_src(code())
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down Expand Up @@ -578,14 +583,9 @@ srv_g_boxplot <- function(id,
DT::formatRound(numeric_cols, 4)
})

joined_qenvs <- reactive({
req(create_plot(), create_table())
teal.code::join(create_plot(), create_table())
})

teal.widgets::verbatim_popup_srv(
id = "rcode",
verbatim_content = reactive(teal.code::get_code(joined_qenvs())),
verbatim_content = reactive(code()),
title = "Show R Code for Boxplot"
)
})
Expand Down
5 changes: 3 additions & 2 deletions R/tm_g_gh_correlationplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ srv_g_correlationplot <- function(id,
brushing = TRUE
)

code <- reactive(teal.code::get_code(plot_q()))

### REPORTER
if (with_reporter) {
Expand Down Expand Up @@ -850,7 +851,7 @@ srv_g_correlationplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(teal.code::get_code(plot_q()))
card$append_src(code())
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down Expand Up @@ -884,7 +885,7 @@ srv_g_correlationplot <- function(id,

teal.widgets::verbatim_popup_srv(
id = "rcode",
verbatim_content = reactive(teal.code::get_code(plot_q())),
verbatim_content = reactive(code()),
title = "Show R Code for Correlation Plot"
)
})
Expand Down
18 changes: 8 additions & 10 deletions R/tm_g_gh_density_distribution_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ srv_g_density_distribution_plot <- function(id, # nolint
hline_arb_color = .(hline_arb_color),
rug_plot = .(rug_plot)
)
print(p)
})
)
}), 800)
Expand All @@ -377,7 +378,7 @@ srv_g_density_distribution_plot <- function(id, # nolint

teal.code::eval_code(
object = anl_q()$qenv,
code = bquote(
code = bquote({
tbl <- goshawk::t_summarytable(
data = ANL,
trt_group = .(trt_group),
Expand All @@ -386,7 +387,8 @@ srv_g_density_distribution_plot <- function(id, # nolint
xaxis_var = .(xaxis_var),
font_size = .(font_size)
)
)
tbl
})
)
}), 800)

Expand Down Expand Up @@ -417,11 +419,11 @@ srv_g_density_distribution_plot <- function(id, # nolint
teal.code::join(create_plot(), create_table())
})

code <- reactive(teal.code::get_code(joined_qenvs()))

teal.widgets::verbatim_popup_srv(
id = "rcode",
verbatim_content = reactive(
teal.code::get_code(joined_qenvs())
),
verbatim_content = reactive(code()),
title = "Show R Code for Density Distribution Plot"
)

Expand Down Expand Up @@ -449,11 +451,7 @@ srv_g_density_distribution_plot <- function(id, # nolint
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(
teal.code::get_code(
teal.code::join(create_plot(), create_table())
)
)
card$append_src(code())
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down
6 changes: 4 additions & 2 deletions R/tm_g_gh_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ srv_lineplot <- function(id,
width = plot_width,
)

code <- reactive(teal.code::get_code(plot_q()))

### REPORTER
if (with_reporter) {
card_fun <- function(comment, label) {
Expand Down Expand Up @@ -808,7 +810,7 @@ srv_lineplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(teal.code::get_code(plot_q()))
card$append_src(code())
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand All @@ -817,7 +819,7 @@ srv_lineplot <- function(id,

teal.widgets::verbatim_popup_srv(
id = "rcode",
verbatim_content = reactive(teal.code::get_code(plot_q())),
verbatim_content = reactive(code()),
title = "Show R Code for Line Plot"
)
})
Expand Down
6 changes: 4 additions & 2 deletions R/tm_g_gh_scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ srv_g_scatterplot <- function(id,
brushing = TRUE
)

code <- reactive(teal.code::get_code(plot_q()))

### REPORTER
if (with_reporter) {
card_fun <- function(comment, label) {
Expand Down Expand Up @@ -394,7 +396,7 @@ srv_g_scatterplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(teal.code::get_code(plot_q()))
card$append_src(code())
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down Expand Up @@ -434,7 +436,7 @@ srv_g_scatterplot <- function(id,

teal.widgets::verbatim_popup_srv(
id = "rcode",
verbatim_content = reactive(teal.code::get_code(plot_q())),
verbatim_content = reactive(code()),
title = "Show R Code for Scatterplot"
)
})
Expand Down
6 changes: 4 additions & 2 deletions R/tm_g_gh_spaghettiplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ srv_g_spaghettiplot <- function(id,
brushing = TRUE
)

code <- reactive(teal.code::get_code(plot_q()))

### REPORTER
if (with_reporter) {
card_fun <- function(comment, label) {
Expand All @@ -553,7 +555,7 @@ srv_g_spaghettiplot <- function(id,
card$append_text("Comment", "header3")
card$append_text(comment)
}
card$append_src(teal.code::get_code(plot_q()))
card$append_src(code())
card
}
teal.reporter::simple_reporter_srv("simple_reporter", reporter = reporter, card_fun = card_fun)
Expand Down Expand Up @@ -593,7 +595,7 @@ srv_g_spaghettiplot <- function(id,

teal.widgets::verbatim_popup_srv(
id = "rcode",
verbatim_content = reactive(teal.code::get_code(plot_q())),
verbatim_content = reactive(code()),
title = "Show R Code for Spaghetti Plot"
)
})
Expand Down

0 comments on commit 84d111b

Please sign in to comment.