Skip to content

Commit ff913dd

Browse files
authored
fixes error in adverse events when ASTDY is of difftime type (#1284)
# Pull Request Fixes #1272 #### Changes description - Similar fix that was applied in #1271
1 parent 6c73968 commit ff913dd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

R/tm_g_pp_adverse_events.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ template_adverse_events <- function(dataname = "ANL",
5252
aeterm, tox_grade, causality, outcome, action, time, decod
5353
) %>%
5454
dplyr::arrange(dplyr::desc(tox_grade)) %>%
55-
`colnames<-`(col_labels(dataname, fill = TRUE)[vars])
56-
55+
`colnames<-`(col_labels(dataname, fill = TRUE)[vars]) %>%
56+
dplyr::mutate( # Exception for columns of type difftime that is not supported by as_listing
57+
dplyr::across(
58+
dplyr::where(~ inherits(., what = "difftime")), ~ as.double(., units = "auto")
59+
)
60+
)
5761
table <- rlistings::as_listing(
5862
table,
5963
key_cols = NULL,

0 commit comments

Comments
 (0)