diff --git a/.lintr b/.lintr index 34473d27..0a0bb22f 100644 --- a/.lintr +++ b/.lintr @@ -1,5 +1,6 @@ linters: linters_with_defaults( line_length_linter = line_length_linter(120), cyclocomp_linter = NULL, - object_usage_linter = NULL + object_usage_linter = NULL, + indentation_linter = NULL ) diff --git a/R/tm_g_ae_oview.R b/R/tm_g_ae_oview.R index 39eaa43a..206750ca 100644 --- a/R/tm_g_ae_oview.R +++ b/R/tm_g_ae_oview.R @@ -369,11 +369,13 @@ srv_g_ae_oview <- function(id, ) ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("AE Overview") - card$append_text("AE Overview", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "AE Overview", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) card$append_text("Plot", "header3") card$append_plot(plot_r(), dim = pws$dim()) if (!comment == "") { diff --git a/R/tm_g_ae_sub.R b/R/tm_g_ae_sub.R index efeaff15..c47dfc94 100644 --- a/R/tm_g_ae_sub.R +++ b/R/tm_g_ae_sub.R @@ -389,11 +389,13 @@ srv_g_ae_sub <- function(id, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("AE Subgroups") - card$append_text("AE Subgroups", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "AE Subgroups", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) card$append_text("Plot", "header3") card$append_plot(plot_r(), dim = pws$dim()) if (!comment == "") { diff --git a/R/tm_g_butterfly.R b/R/tm_g_butterfly.R index e110b1d0..c3870334 100644 --- a/R/tm_g_butterfly.R +++ b/R/tm_g_butterfly.R @@ -529,11 +529,13 @@ srv_g_butterfly <- function(id, data, filter_panel_api, reporter, dataname, labe ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Butterfly") - card$append_text("Butterfly Plot", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Butterfly Plot", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) if (!is.null(input$filter_var) || !is.null(input$facet_var) || !is.null(input$sort_by_var)) { card$append_text("Selected Options", "header3") } diff --git a/R/tm_g_events_term_id.R b/R/tm_g_events_term_id.R index 6ef88693..6d84621b 100644 --- a/R/tm_g_events_term_id.R +++ b/R/tm_g_events_term_id.R @@ -377,11 +377,13 @@ srv_g_events_term_id <- function(id, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Events by Term") - card$append_text("Events by Term", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Events by Term", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) card$append_text("Plot", "header3") card$append_plot(plot_r(), dim = pws$dim()) if (!comment == "") { diff --git a/R/tm_g_heat_bygrade.R b/R/tm_g_heat_bygrade.R index 7319a98d..18580b3e 100644 --- a/R/tm_g_heat_bygrade.R +++ b/R/tm_g_heat_bygrade.R @@ -495,11 +495,13 @@ srv_g_heatmap_bygrade <- function(id, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Heatmap by Grade") - card$append_text("Heatmap by Grade", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Heatmap by Grade", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) card$append_text("Plot", "header3") card$append_plot(plot_r(), dim = pws$dim()) if (!comment == "") { diff --git a/R/tm_g_patient_profile.R b/R/tm_g_patient_profile.R index e8c3fe0d..f7950419 100644 --- a/R/tm_g_patient_profile.R +++ b/R/tm_g_patient_profile.R @@ -951,11 +951,13 @@ srv_g_patient_profile <- function(id, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Patient Profile") - card$append_text("Patient Profile", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Patient Profile", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) card$append_text("Plot", "header3") card$append_plot(plot_r(), dim = pws$dim()) if (!comment == "") { diff --git a/R/tm_g_spiderplot.R b/R/tm_g_spiderplot.R index 6bcbea17..20d17f64 100644 --- a/R/tm_g_spiderplot.R +++ b/R/tm_g_spiderplot.R @@ -438,11 +438,13 @@ srv_g_spider <- function(id, data, filter_panel_api, reporter, dataname, label, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Spider Plot") - card$append_text("Spider Plot", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Spider Plot", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) if (!is.null(input$paramcd) || !is.null(input$xfacet_var) || !is.null(input$yfacet_var)) { card$append_text("Selected Options", "header3") } diff --git a/R/tm_g_swimlane.R b/R/tm_g_swimlane.R index 09cd7626..ea6661dd 100644 --- a/R/tm_g_swimlane.R +++ b/R/tm_g_swimlane.R @@ -542,11 +542,13 @@ srv_g_swimlane <- function(id, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Swimlane") - card$append_text("Swimlane Plot", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Swimlane Plot", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) if (!is.null(input$sort_var)) { card$append_text("Selected Options", "header3") card$append_text(paste("Sorted by:", input$sort_var)) diff --git a/R/tm_g_waterfall.R b/R/tm_g_waterfall.R index 58ac098d..f329e48d 100644 --- a/R/tm_g_waterfall.R +++ b/R/tm_g_waterfall.R @@ -559,11 +559,13 @@ srv_g_waterfall <- function(id, ### REPORTER if (with_reporter) { - card_fun <- function(comment) { - card <- teal::TealReportCard$new() - card$set_name("Waterfall") - card$append_text("Waterfall Plot", "header2") - if (with_filter) card$append_fs(filter_panel_api$get_filter_state()) + card_fun <- function(comment, label) { + card <- teal::report_card_template( + title = "Waterfall Plot", + label = label, + with_filter = with_filter, + filter_panel_api = filter_panel_api + ) card$append_text("Selected Options", "header3") card$append_text(paste0("Tumor Burden Parameter: ", input$bar_paramcd, ".")) if (!is.null(input$sort_var)) {