diff --git a/DESCRIPTION b/DESCRIPTION index 523b1a7..b3659bd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,4 +47,4 @@ Suggests: tidyr Config/testthat/edition: 3 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/R/tlf_ae_exp_adj.R b/R/tlf_ae_exp_adj.R index 279154a..bf8ba24 100644 --- a/R/tlf_ae_exp_adj.R +++ b/R/tlf_ae_exp_adj.R @@ -20,6 +20,8 @@ #' #' @inheritParams tlf_ae_specific #' +#' @param analysis One of analysis name existing at `outdata$meta$analysis` +#' #' @return RTF file and source dataset for exposure-adjusted AE summary table. #' #' @export @@ -37,11 +39,13 @@ #' format_ae_exp_adj() |> #' tlf_ae_exp_adj( #' source = "Source: [CDISCpilot: adam-adsl; adae]", +#' analysis = "ae_exp_adj", #' path_outdata = tempfile(fileext = ".Rdata"), #' path_outtable = tempfile(fileext = ".rtf") #' ) tlf_ae_exp_adj <- function(outdata, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "portrait", @@ -56,6 +60,15 @@ tlf_ae_exp_adj <- function(outdata, n_row <- nrow(tbl) n_col <- ncol(tbl) + # Check if the parameter analysis contains the correct analysis that should exist in "outdata$meta$analysis" + analysis_name <- names(outdata$meta$analysis) + if (!(analysis %in% analysis_name)) { + stop( + "Please provide a valid analysis that matches with what being defined in 'outdata$meta$analysis'", + call. = FALSE + ) + } + parameters <- unlist(strsplit(outdata$parameter, ";")) # Title @@ -65,7 +78,7 @@ tlf_ae_exp_adj <- function(outdata, outdata$population, outdata$observation, parameters[1], - analysis = "ae_exp_adj", + analysis = analysis, title_order = title ) } diff --git a/R/tlf_ae_listing.R b/R/tlf_ae_listing.R index 34d302f..5c4176e 100644 --- a/R/tlf_ae_listing.R +++ b/R/tlf_ae_listing.R @@ -21,6 +21,7 @@ #' @param outdata An `outdata` object created by [prepare_ae_listing()]. #' @param footnotes A character vector of table footnotes. #' @param source A character value of the data source. +#' @param analysis One of analysis name existing at `outdata$meta$analysis` #' @inheritParams r2rtf::rtf_page #' @inheritParams r2rtf::rtf_body #' @param path_outdata A character string of the outdata path. @@ -39,12 +40,14 @@ #' tlf_ae_listing( #' footnotes = "footnote1", #' source = "Source: [CDISCpilot: adam-adsl; adae]", +#' analysis = "ae_listing", #' path_outdata = tempfile(fileext = ".Rdata"), #' path_outtable = tempfile(fileext = ".rtf") #' ) tlf_ae_listing <- function(outdata, footnotes = NULL, source = NULL, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "landscape", @@ -52,7 +55,16 @@ tlf_ae_listing <- function(outdata, path_outtable = NULL) { res <- outdata$tbl - mapping <- collect_adam_mapping(outdata$meta, "ae_listing") + # Check if the parameter analysis contains the correct analysis that should exist in "outdata$meta$analysis" + analysis_name <- names(outdata$meta$analysis) + if (!(analysis %in% analysis_name)) { + stop( + "Please provide a valid analysis that matches with what being defined in 'outdata$meta$analysis'", + call. = FALSE + ) + } + + mapping <- collect_adam_mapping(outdata$meta, analysis) var_name <- eval(mapping$var_name) subline <- eval(mapping$subline) subline_by <- eval(mapping$subline_by) @@ -62,7 +74,7 @@ tlf_ae_listing <- function(outdata, col_name <- outdata$col_name # Define title - title <- collect_title(outdata$meta, outdata$population, outdata$observation, outdata$parameter, analysis = "ae_listing") + title <- collect_title(outdata$meta, outdata$population, outdata$observation, outdata$parameter, analysis = analysis) if (!nrow(res) == 0) { res <- as.data.frame(res) diff --git a/R/tlf_ae_specific.R b/R/tlf_ae_specific.R index 50048f6..757a686 100644 --- a/R/tlf_ae_specific.R +++ b/R/tlf_ae_specific.R @@ -22,6 +22,7 @@ #' @param meddra_version A character value of the MedDRA version #' for this dataset. #' @param source A character value of the data source. +#' @param analysis One of analysis name existing at `outdata$meta$analysis` #' @inheritParams r2rtf::rtf_page #' @inheritParams r2rtf::rtf_body #' @param footnotes A character vector of table footnotes. @@ -46,6 +47,7 @@ #' format_ae_specific() |> #' tlf_ae_specific( #' source = "Source: [CDISCpilot: adam-adsl; adae]", +#' analysis = "ae_specific", #' meddra_version = "24.0", #' path_outdata = tempfile(fileext = ".Rdata"), #' path_outtable = tempfile(fileext = ".rtf") @@ -53,6 +55,7 @@ tlf_ae_specific <- function(outdata, meddra_version, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "portrait", @@ -92,6 +95,15 @@ tlf_ae_specific <- function(outdata, ) } + # Check if the parameter analysis contains the correct analysis that should exist in "outdata$meta$analysis" + analysis_name <- names(outdata$meta$analysis) + if (!(analysis %in% analysis_name)) { + stop( + "Please provide a valid analysis that matches with what being defined in 'outdata$meta$analysis'", + call. = FALSE + ) + } + # Define title if ("analysis" %in% title | "observation" %in% title | "population" %in% title) { title_key <- title @@ -99,7 +111,7 @@ tlf_ae_specific <- function(outdata, outdata$population, outdata$observation, outdata$parameter, - analysis = "ae_specific", + analysis = analysis, title_order = title ) diff --git a/R/tlf_ae_specific_subgroup.R b/R/tlf_ae_specific_subgroup.R index b8996b1..3043d4b 100644 --- a/R/tlf_ae_specific_subgroup.R +++ b/R/tlf_ae_specific_subgroup.R @@ -20,6 +20,8 @@ #' #' @inheritParams tlf_ae_specific #' +#' @param analysis One of analysis name existing at `outdata$meta$analysis` +#' #' @return RTF file and the source dataset for AE specific subgroup analysis table. #' #' @export @@ -37,12 +39,14 @@ #' tlf_ae_specific_subgroup( #' meddra_version = "24.0", #' source = "Source: [CDISCpilot: adam-adsl; adae]", +#' analysis = "ae_specific", #' path_outtable = tempfile(fileext = ".rtf") #' ) tlf_ae_specific_subgroup <- function( outdata, meddra_version, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "landscape", @@ -88,13 +92,22 @@ tlf_ae_specific_subgroup <- function( ) } + # Check if the parameter analysis contains the correct analysis that should exist in "outdata$meta$analysis" + analysis_name <- names(outdata$meta$analysis) + if (!(analysis %in% analysis_name)) { + stop( + "Please provide a valid analysis that matches with what being defined in 'outdata$meta$analysis'", + call. = FALSE + ) + } + # Define title if (is.null(title)) { title <- collect_title(outdata$meta, outdata$population, outdata$observation, outdata$parameter, - analysis = "ae_specific" + analysis = analysis ) } diff --git a/R/tlf_ae_summary.R b/R/tlf_ae_summary.R index f775090..1282bfd 100644 --- a/R/tlf_ae_summary.R +++ b/R/tlf_ae_summary.R @@ -20,6 +20,8 @@ #' #' @inheritParams tlf_ae_specific #' +#' @param analysis One of analysis name existing at `outdata$meta$analysis` +#' #' @return RTF file and the source dataset for AE summary table. #' #' @export @@ -35,11 +37,13 @@ #' format_ae_summary() |> #' tlf_ae_summary( #' source = "Source: [CDISCpilot: adam-adsl; adae]", +#' analysis = "ae_summary", #' path_outdata = tempfile(fileext = ".Rdata"), #' path_outtable = tempfile(fileext = ".rtf") #' ) tlf_ae_summary <- function(outdata, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "portrait", @@ -54,6 +58,15 @@ tlf_ae_summary <- function(outdata, n_row <- nrow(tbl) n_col <- ncol(tbl) + # Check if the parameter analysis contains the correct analysis that should exist in "outdata$meta$analysis" + analysis_name <- names(outdata$meta$analysis) + if (!(analysis %in% analysis_name)) { + stop( + "Please provide a valid analysis that matches with what being defined in 'outdata$meta$analysis'", + call. = FALSE + ) + } + parameters <- unlist(strsplit(outdata$parameter, ";")) # Title @@ -63,7 +76,7 @@ tlf_ae_summary <- function(outdata, outdata$population, outdata$observation, parameters[1], - analysis = "ae_summary", + analysis = analysis, title_order = title ) } diff --git a/man/tlf_ae_exp_adj.Rd b/man/tlf_ae_exp_adj.Rd index b575f3c..b621cce 100644 --- a/man/tlf_ae_exp_adj.Rd +++ b/man/tlf_ae_exp_adj.Rd @@ -7,6 +7,7 @@ tlf_ae_exp_adj( outdata, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "portrait", @@ -21,6 +22,8 @@ tlf_ae_exp_adj( \item{source}{A character value of the data source.} +\item{analysis}{One of analysis name existing at \code{outdata$meta$analysis}} + \item{col_rel_width}{Column relative width in a vector e.g. c(2,1,1) refers to 2:1:1. Default is NULL for equal column width.} @@ -58,6 +61,7 @@ outdata |> format_ae_exp_adj() |> tlf_ae_exp_adj( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_exp_adj", path_outdata = tempfile(fileext = ".Rdata"), path_outtable = tempfile(fileext = ".rtf") ) diff --git a/man/tlf_ae_listing.Rd b/man/tlf_ae_listing.Rd index a56788b..9857acd 100644 --- a/man/tlf_ae_listing.Rd +++ b/man/tlf_ae_listing.Rd @@ -8,6 +8,7 @@ tlf_ae_listing( outdata, footnotes = NULL, source = NULL, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "landscape", @@ -22,6 +23,8 @@ tlf_ae_listing( \item{source}{A character value of the data source.} +\item{analysis}{One of analysis name existing at \code{outdata$meta$analysis}} + \item{col_rel_width}{Column relative width in a vector e.g. c(2,1,1) refers to 2:1:1. Default is NULL for equal column width.} @@ -50,6 +53,7 @@ prepare_ae_listing(meta, "ae_listing", "apat", "wk12", "ser") |> tlf_ae_listing( footnotes = "footnote1", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_listing", path_outdata = tempfile(fileext = ".Rdata"), path_outtable = tempfile(fileext = ".rtf") ) diff --git a/man/tlf_ae_specific.Rd b/man/tlf_ae_specific.Rd index 99559a8..7668b74 100644 --- a/man/tlf_ae_specific.Rd +++ b/man/tlf_ae_specific.Rd @@ -8,6 +8,7 @@ tlf_ae_specific( outdata, meddra_version, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "portrait", @@ -25,6 +26,8 @@ for this dataset.} \item{source}{A character value of the data source.} +\item{analysis}{One of analysis name existing at \code{outdata$meta$analysis}} + \item{col_rel_width}{Column relative width in a vector e.g. c(2,1,1) refers to 2:1:1. Default is NULL for equal column width.} @@ -61,6 +64,7 @@ meta |> format_ae_specific() |> tlf_ae_specific( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", meddra_version = "24.0", path_outdata = tempfile(fileext = ".Rdata"), path_outtable = tempfile(fileext = ".rtf") diff --git a/man/tlf_ae_specific_subgroup.Rd b/man/tlf_ae_specific_subgroup.Rd index f8e181d..10209af 100644 --- a/man/tlf_ae_specific_subgroup.Rd +++ b/man/tlf_ae_specific_subgroup.Rd @@ -8,6 +8,7 @@ tlf_ae_specific_subgroup( outdata, meddra_version, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "landscape", @@ -25,6 +26,8 @@ for this dataset.} \item{source}{A character value of the data source.} +\item{analysis}{One of analysis name existing at \code{outdata$meta$analysis}} + \item{col_rel_width}{Column relative width in a vector e.g. c(2,1,1) refers to 2:1:1. Default is NULL for equal column width.} @@ -62,6 +65,7 @@ prepare_ae_specific_subgroup(meta, tlf_ae_specific_subgroup( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outtable = tempfile(fileext = ".rtf") ) } diff --git a/man/tlf_ae_summary.Rd b/man/tlf_ae_summary.Rd index ff52ef2..c7cfc2f 100644 --- a/man/tlf_ae_summary.Rd +++ b/man/tlf_ae_summary.Rd @@ -7,6 +7,7 @@ tlf_ae_summary( outdata, source, + analysis, col_rel_width = NULL, text_font_size = 9, orientation = "portrait", @@ -21,6 +22,8 @@ tlf_ae_summary( \item{source}{A character value of the data source.} +\item{analysis}{One of analysis name existing at \code{outdata$meta$analysis}} + \item{col_rel_width}{Column relative width in a vector e.g. c(2,1,1) refers to 2:1:1. Default is NULL for equal column width.} @@ -56,6 +59,7 @@ outdata |> format_ae_summary() |> tlf_ae_summary( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_summary", path_outdata = tempfile(fileext = ".Rdata"), path_outtable = tempfile(fileext = ".rtf") ) diff --git a/tests/testthat/test-independent-testing-empty_table.R b/tests/testthat/test-independent-testing-empty_table.R index 0e6ec38..2f23b8a 100644 --- a/tests/testthat/test-independent-testing-empty_table.R +++ b/tests/testthat/test-independent-testing-empty_table.R @@ -39,6 +39,7 @@ generate_analysis_or_empty <- function(meta, outdata) { ) |> tlf_ae_specific( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", meddra_version = "24.0", path_outdata = path_rdata, path_outtable = path_rtf @@ -74,6 +75,7 @@ test_that("RTF output: empty table or analysis table.", { ) |> tlf_ae_specific( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", meddra_version = "24.0", path_outdata = path_rdata, path_outtable = path_rtf diff --git a/tests/testthat/test-independent-testing-tlf-ae-listing.R b/tests/testthat/test-independent-testing-tlf-ae-listing.R index be918c3..85fdb6c 100644 --- a/tests/testthat/test-independent-testing-tlf-ae-listing.R +++ b/tests/testthat/test-independent-testing-tlf-ae-listing.R @@ -15,6 +15,7 @@ tbl <- outdata |> tlf_ae_listing( footnotes = "footnote1", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_listing", path_outdata = path_rdata, path_outtable = path_rtf ) diff --git a/tests/testthat/test-independent-testing-tlf_ae_exp_adj.R b/tests/testthat/test-independent-testing-tlf_ae_exp_adj.R index e5bb24d..fbd4e84 100644 --- a/tests/testthat/test-independent-testing-tlf_ae_exp_adj.R +++ b/tests/testthat/test-independent-testing-tlf_ae_exp_adj.R @@ -21,6 +21,7 @@ test_that("rtf output: n, total_exp, events, eaer, total", { ) |> tlf_ae_exp_adj( source = "Source: [CDISCpilot: adam-adsl]", + analysis = "ae_exp_adj", path_outdata = path_rdata, path_outtable = path_rtf ) @@ -51,6 +52,7 @@ test_that("rtf output: n, total_exp, events, eaer, total", { ) |> tlf_ae_exp_adj( source = "Source: [CDISCpilot: adam-adsl]", + analysis = "ae_exp_adj", path_outdata = path_rdata, path_outtable = path_rtf ) diff --git a/tests/testthat/test-independent-testing-tlf_ae_specific.R b/tests/testthat/test-independent-testing-tlf_ae_specific.R index fadf9f0..7841a6a 100644 --- a/tests/testthat/test-independent-testing-tlf_ae_specific.R +++ b/tests/testthat/test-independent-testing-tlf_ae_specific.R @@ -20,6 +20,7 @@ test_that("rtf output: events, dur, n, and prop w/o total", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outdata = path_rdata, path_outtable = path_rtf ) @@ -41,6 +42,7 @@ test_that("rtf output: events, dur, n, and prop w/ total", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outdata = path_rdata, path_outtable = path_rtf ) @@ -64,6 +66,7 @@ test_that("rtf output: diff, events, dur, n, and prop w/o total", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outdata = path_rdata, path_outtable = path_rtf ) @@ -86,6 +89,7 @@ test_that("rtf output: diff, events, dur, n, and prop w/ total", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", col_rel_width = c(5, rep(c(1, 2, 3, 3), 4), 1, 2, 3, 1, 2, 3), path_outdata = path_rdata, path_outtable = path_rtf @@ -111,6 +115,7 @@ test_that("rtf output: events, dur, n, and prop w/ total", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outdata = path_rdata, path_outtable = path_rtf ) @@ -166,6 +171,7 @@ test_that("relative width 'works'", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outdata = path_rdata, path_outtable = path_rtf, col_rel_width = c(rep(1, 8)) @@ -181,6 +187,7 @@ test_that("relative width 'works'", { tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", path_outdata = path_rdata, path_outtable = path_rtf, col_rel_width = c(rep(1, 7)) diff --git a/tests/testthat/test-independent-testing-tlf_ae_specific_subgroup.R b/tests/testthat/test-independent-testing-tlf_ae_specific_subgroup.R index 2ea6011..11b82c7 100644 --- a/tests/testthat/test-independent-testing-tlf_ae_specific_subgroup.R +++ b/tests/testthat/test-independent-testing-tlf_ae_specific_subgroup.R @@ -18,6 +18,7 @@ test_that("rtf output: n, and prop w/o total", { tlf_ae_specific_subgroup( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", # path_outdata = path_rdata, path_outtable = path_rtf ) diff --git a/tests/testthat/test-independent-testing-tlf_ae_summary.R b/tests/testthat/test-independent-testing-tlf_ae_summary.R index f7cf8e5..65335af 100644 --- a/tests/testthat/test-independent-testing-tlf_ae_summary.R +++ b/tests/testthat/test-independent-testing-tlf_ae_summary.R @@ -14,6 +14,7 @@ tbl <- outdata |> format_ae_summary() |> tlf_ae_summary( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_summary", path_outtable = path_rtf, path_outdata = path_rdata ) diff --git a/vignettes/ae-listing.Rmd b/vignettes/ae-listing.Rmd index 836ea9c..e337b1d 100644 --- a/vignettes/ae-listing.Rmd +++ b/vignettes/ae-listing.Rmd @@ -101,6 +101,7 @@ tbl |> tlf_ae_listing( footnotes = footnote, orientation = "portrait", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_listing", # Provide analysis type defined in meta$analysis path_outtable = "rtf/ae0listing0ser0wk12.rtf", path_outdata = NULL ) diff --git a/vignettes/ae-specific-subgroup.Rmd b/vignettes/ae-specific-subgroup.Rmd index ad6a212..22b5069 100644 --- a/vignettes/ae-specific-subgroup.Rmd +++ b/vignettes/ae-specific-subgroup.Rmd @@ -161,6 +161,7 @@ outdata |> tlf_ae_specific_subgroup( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", # Provide analysis type defined in meta$analysis path_outtable = "rtf/ae0specific0sub0gender1.rtf" ) ``` diff --git a/vignettes/ae-specific.Rmd b/vignettes/ae-specific.Rmd index 9b994b2..f0fe08e 100644 --- a/vignettes/ae-specific.Rmd +++ b/vignettes/ae-specific.Rmd @@ -255,6 +255,7 @@ outdata |> tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", # Provide analysis type defined in meta$analysis path_outtable = "rtf/ae0specific1.rtf" ) ``` @@ -272,6 +273,7 @@ outdata |> tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", # Provide analysis type defined in meta$analysis col_rel_width = c(6, rep(1, 8)), text_font_size = 8, orientation = "landscape", @@ -291,6 +293,7 @@ outdata |> tlf_ae_specific( meddra_version = "24.0", source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_specific", # Provide analysis type defined in meta$analysis path_outtable = "rtf/mock_ae0specific1.rtf" ) ``` diff --git a/vignettes/ae-summary.Rmd b/vignettes/ae-summary.Rmd index 5bf3849..8cc0857 100644 --- a/vignettes/ae-summary.Rmd +++ b/vignettes/ae-summary.Rmd @@ -187,6 +187,7 @@ outdata |> format_ae_summary() |> tlf_ae_summary( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_summary", # Provide analysis type defined in meta$analysis path_outtable = "rtf/ae0summary1.rtf" ) ``` @@ -202,6 +203,7 @@ outdata |> format_ae_summary() |> tlf_ae_summary( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_summary", # Provide analysis type defined in meta$analysis col_rel_width = c(6, rep(1, 8)), text_font_size = 8, orientation = "landscape", @@ -228,6 +230,7 @@ outdata |> format_ae_summary(mock = TRUE) |> tlf_ae_summary( source = "Source: [CDISCpilot: adam-adsl; adae]", + analysis = "ae_summary", # Provide analysis type defined in meta$analysis path_outtable = "rtf/mock_ae0summary1.rtf" ) ``` diff --git a/vignettes/metalite-ae.Rmd b/vignettes/metalite-ae.Rmd index eea88bd..d46e902 100644 --- a/vignettes/metalite-ae.Rmd +++ b/vignettes/metalite-ae.Rmd @@ -89,6 +89,7 @@ meta_ae_example() |> # Example AE data created using metalite format_ae_summary() |> tlf_ae_summary( source = "Source: [CDISCpilot: adam-adsl; adae]", # Define data source + analysis = "ae_specific", # Provide analysis type defined in meta$analysis path_outtable = "ae0summary.rtf" # Define output ) ```