From ae903e92e87002b2cd7cfd1c3ff77c71a4831b82 Mon Sep 17 00:00:00 2001
From: Rosemary Li
Date: Mon, 19 Feb 2024 15:52:08 +0000
Subject: [PATCH] add equal sign
---
R/calculate_study_day.R | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/R/calculate_study_day.R b/R/calculate_study_day.R
index cf882dbc..afc3841a 100644
--- a/R/calculate_study_day.R
+++ b/R/calculate_study_day.R
@@ -36,8 +36,6 @@
#' calculate_study_day(ae, dm, "RFSTDTC", "AESTDTC", "AESTDY")
#'
calculate_study_day <- function(sdtm_in,
- dm_domain,
- refdt = "RFSTDTC",
tgdt,
study_day_var,
dm_domain = "DM",
@@ -126,7 +124,7 @@ calculate_study_day <- function(sdtm_in,
tgt <- sdtm_in[[tgdt]]
# SDTMIG 4.4.4 Use of the Study Day Variables
- res <- ifelse(tgt > ref, tgt - ref + 1L, tgt - ref)
+ res <- ifelse(tgt >= ref, tgt - ref + 1L, tgt - ref)
sdtm_in <- sdtm_in[original_variables]
sdtm_in[study_day_var] <- res