From 602d919427551e507dbe3e6488da819b17e065e6 Mon Sep 17 00:00:00 2001 From: smritia Date: Wed, 18 Sep 2024 09:07:31 +0000 Subject: [PATCH] Report_meta updates --- R/graph_utils.R | 2 +- R/tbl_display.R | 4 ++-- R/utils.R | 36 ++++++++++++++++++++++++++++++------ man/tbl_processor.Rd | 4 ++-- 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/R/graph_utils.R b/R/graph_utils.R index 42b50d1..c97de66 100644 --- a/R/graph_utils.R +++ b/R/graph_utils.R @@ -581,7 +581,7 @@ plot_title_nsubj <- function(datain, plot_data, by) { } else { plot_data <- bind_cols(plot_data, adsin_count) } - return(plot_data) + plot_data } #' Convert dataframe into ggplot object table diff --git a/R/tbl_display.R b/R/tbl_display.R index 8655113..173c733 100644 --- a/R/tbl_display.R +++ b/R/tbl_display.R @@ -22,8 +22,8 @@ #' @param extra_mergeby Variables to merge `extra_df` by, if present. #' @param dropvars Variables additional to standard present in input data to be removed from output #' @param keepvars Specific variables to be retained in report in addition to grouping and value -#' columns. If `keepvars` is given it overrides `dropvars` and the columns are located as last columns -#' of the output. +#' columns. If `keepvars` is given it overrides `dropvars` and the columns are located as last +#' columns of the output. #' @param disp_value_col Hide/Show value column from the final display. #' @param addrowvars Group Variable(s) to be removed as a column and instead used as row headers #' in the value column. diff --git a/R/utils.R b/R/utils.R index 9a624ec..5e30a3e 100644 --- a/R/utils.R +++ b/R/utils.R @@ -41,7 +41,7 @@ data_attrib <- function(datain) { ), c("VAR_NAMES", "VAR_LABEL") ) - return(data_attr) + data_attr } @@ -122,7 +122,7 @@ round_f <- function(x, digits = 2) { fmtrd <- function(f, d = 2, ...) { function(x) { dc <- do.call(f, args = list(x, na.rm = TRUE, ...)) - return(ifelse(is.na(dc), "-", round_f(dc, d))) + ifelse(is.na(dc), "-", round_f(dc, d)) } } @@ -526,20 +526,26 @@ get_report_meta <- function() { ~REPTYPE, "Any", "ADAE", - "adae_r001", + "adae_tier_summary", "Summary of Adverse Events by System Organ Class and Preferred Term", "2.1", "Table", "Any", "ADAE", - "Forest Plot", - "Forest plot for adverse events", + "adae_risk_summary", + "Relative Risk of Adverse Events by System Organ Class and Preferred Term", "2.2", + "Table", + "Any", + "ADAE", + "Forest Plot", + "Forest plot for Adverse Events", + "2.3", "Figure", "Any", "ADAE", "Volcano Plot", - "Volcano plot for adverse events", + "Volcano plot for Adverse Events", "2.4", "Figure", "Any", @@ -548,6 +554,24 @@ get_report_meta <- function() { "Event analysis of MedRA query", "2.5", "Figure", + "Any", + "ADAE", + "Tornado Plot", + "Tornado plot for Adverse Events", + "2.6", + "Figure", + "Any", + "ADSL", + "adsl_summary", + "Demographic Summary", + "3.1", + "Table", + "Oncology", + "ADTTE", + "KM Plot", + "Kaplan Meier Plot for Time to Events", + "4.1", + "Figure", ) } diff --git a/man/tbl_processor.Rd b/man/tbl_processor.Rd index 7875150..4f218f6 100644 --- a/man/tbl_processor.Rd +++ b/man/tbl_processor.Rd @@ -31,8 +31,8 @@ eg: If analysis vars (\code{DPTVAR}) contains \verb{AGEGR1, RACE}; \code{dptlabe \item{dropvars}{Variables additional to standard present in input data to be removed from output} \item{keepvars}{Specific variables to be retained in report in addition to grouping and value -columns. If \code{keepvars} is given it overrides \code{dropvars} and the columns are located as last columns -of the output.} +columns. If \code{keepvars} is given it overrides \code{dropvars} and the columns are located as last +columns of the output.} \item{disp_value_col}{Hide/Show value column from the final display.}