Skip to content

Commit fb2b307

Browse files
Make output for contrasts validation more concise (#81)
* Make output more concise * Reduce supression and minor format change
1 parent 9363e99 commit fb2b307

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

R/accessory.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -869,17 +869,16 @@ checkListIsSubset <- function(test_list,
869869
test_list_name,
870870
reference_list_name) {
871871
if (!all(test_list %in% reference_list)) {
872+
missing_vars <- test_list[!test_list %in% reference_list]
872873
stop(
873874
paste0(
874875
"Not all ",
875876
test_list_name,
876-
" (",
877-
paste(test_list, collapse = ","),
878-
") are available in the ",
877+
" are available in the ",
879878
reference_list_name,
880-
" (",
881-
paste(reference_list, collapse = ","),
882-
")"
879+
".\n",
880+
"Missing ", test_list_name, ": ", paste(missing_vars, collapse = ", "), "\n",
881+
"Available ", reference_list_name, ": ", paste(unique(reference_list), collapse = ", ")
883882
)
884883
)
885884
}

exec/validate_fom_components.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if (length(missing_args) > 0) {
102102
stop(paste("Missing mandatory arguments:", paste(missing_args, collapse = ", ")))
103103
}
104104

105-
library(shinyngs)
105+
suppressPackageStartupMessages(library(shinyngs, quietly = TRUE, warn.conflicts = FALSE))
106106

107107
# validate_inputs() just wraps the parsing functions of shinyng, used by e.g.
108108
# eselistfromConfig(). These functions are good for ensuring the consistency of

0 commit comments

Comments
 (0)