From 642c6eee7cf49daad879b64d5394fc67afc81029 Mon Sep 17 00:00:00 2001 From: "Fukuda, Hiroaki" Date: Sun, 19 Apr 2026 22:17:40 -0400 Subject: [PATCH 1/2] Update `ae_listing()` to avoid an error when age, sex, or race is unspecified for a litsing --- R/ae_listing.R | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/R/ae_listing.R b/R/ae_listing.R index 02432fe..8df6a87 100644 --- a/R/ae_listing.R +++ b/R/ae_listing.R @@ -208,11 +208,17 @@ format_ae_listing <- function(outdata, display_unique_records = FALSE) { } attr(res[["Participant_ID"]], "label") <- NULL - res[["Gender"]] <- tools::toTitleCase(res[["SEX"]]) + if ("SEX" %in% toupper(names(res))) { + res[["Gender"]] <- tools::toTitleCase(res[["SEX"]]) + } - res[["Race"]] <- tools::toTitleCase(tolower(res[["RACE"]])) + if ("RACE" %in% toupper(names(res))) { + res[["Race"]] <- tools::toTitleCase(tolower(res[["RACE"]])) + } - res[["Age"]] <- res[["AGE"]] + if ("AGE" %in% toupper(names(res))) { + res[["Age"]] <- res[["AGE"]] + } res[["Treatment_Group"]] <- res[[obs_group]] From cb8724707489e3725bdbd659cb06c6e7a6b316f5 Mon Sep 17 00:00:00 2001 From: "Fukuda, Hiroaki" Date: Sun, 19 Apr 2026 22:53:15 -0400 Subject: [PATCH 2/2] Update `oxygen2` comments of `prepare_ae_fprestly()` due to duplacated param --- R/prepare_ae_forestly.R | 10 ---------- man/prepare_ae_forestly.Rd | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/R/prepare_ae_forestly.R b/R/prepare_ae_forestly.R index 06b59fa..455e227 100644 --- a/R/prepare_ae_forestly.R +++ b/R/prepare_ae_forestly.R @@ -19,16 +19,6 @@ #' Prepare datasets for interactive forest plot #' #' @inheritParams metalite.ae::prepare_ae_specific -#' @param meta A metadata object created by metalite. -#' @param population A character value of population term name. -#' The term name is used as key to link information. -#' @param observation A character value of observation term name. -#' The term name is used as key to link information. -#' @param parameter A character value of parameter term name. -#' The term name is used as key to link information. -#' @param components A character vector of components name, default value is `"par"`. -#' @param reference_group An integer to indicate reference group. -#' Default is 2 if there are 2 groups, otherwise, the default is 1. #' @param ae_listing_display A vector of name of variables used to display #' on AE listing table. #' @param ae_listing_unique A logical value to display only unique records diff --git a/man/prepare_ae_forestly.Rd b/man/prepare_ae_forestly.Rd index 190c888..8023c14 100644 --- a/man/prepare_ae_forestly.Rd +++ b/man/prepare_ae_forestly.Rd @@ -30,7 +30,7 @@ The term name is used as key to link information.} \item{parameter}{A character value of parameter term name. The term name is used as key to link information.} -\item{components}{A character vector of components name, default value is \code{"par"}.} +\item{components}{A character vector of components name.} \item{reference_group}{An integer to indicate reference group. Default is 2 if there are 2 groups, otherwise, the default is 1.}