Skip to content

Commit

Permalink
set .call to FALSE for warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosemary Li committed Jan 22, 2024
1 parent 1c267e1 commit aecf81d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/calculate_study_day.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ calculate_study_day <- function(sdtm_in,
)
}

original_variables <- names(sdtm_in)

if (!identical(sdtm_in, dm_domain)) {
dm_domain <- unique(dm_domain[c(merge_key, refdt)])

Expand Down Expand Up @@ -104,7 +106,8 @@ calculate_study_day <- function(sdtm_in,
warning(
"Encountered errors when converting refdt to dates. ",
"The warning message is ",
e$message
e$message,
call. = FALSE
)
NA
}
Expand All @@ -115,7 +118,8 @@ calculate_study_day <- function(sdtm_in,
warning(
"Encountered errors when converting tgdt to dates. ",
"The warning message is ",
e$message
e$message,
call. = FALSE
)
NA
}
Expand All @@ -133,6 +137,8 @@ calculate_study_day <- function(sdtm_in,
no = NA
)
)

sdtm_in <- sdtm_in[original_variables]
sdtm_in[study_day_var] <- res
return(sdtm_in)
}
Expand Down

0 comments on commit aecf81d

Please sign in to comment.