Skip to content

Commit 972bc1c

Browse files
committed
add manual early error feedback to check for arm_default_vals being of type character
1 parent 84d2d16 commit 972bc1c

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: dv.edish
22
Type: Package
33
Title: eDISH Plot Module for DILI assessment
4-
Version: 1.2.0-9001
4+
Version: 1.2.0-9002
55
Authors@R:
66
c(
77
person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# dv.edish 1.2.0-9001
1+
# dv.edish 1.2.0-9002
22

33
- Add jumping feature.
4+
- Arm default values can be arbitrarily specified as long as they are character strings. This supports including multiple studies with different arm values.
45

56
# dv.edish 1.2.0
67

R/mod_edish.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,17 @@ check_mod_edish <- function(
492492
lb_result_var, ref_range_upper_lim_var, receiver_id,
493493
warn, err
494494
)
495+
496+
# Check only if `arm_default_vals` is a character vector
497+
# Reason: Arbitrary values allowed in case multiple studies are included with different arm values
498+
CM$assert(
499+
container = err,
500+
cond = is.character(arm_default_vals),
501+
msg = sprintf(
502+
'The values assigned to `arm_default_vals` are of type %s, but should be of type character.',
503+
typeof(arm_default_vals)
504+
)
505+
)
495506

496507
# NOTE: Prevents dplyr from exploding inside `prepare_initial_data`
497508
var_parameters <- c("subjectid_var", "arm_var", "visit_var", "lb_test_var", "lb_result_var")

0 commit comments

Comments
 (0)