Skip to content

Commit 999538a

Browse files
authored
Merge pull request #316 from cmu-delphi/djm/args-list-printing
Djm/args list printing
2 parents 114b0e7 + 696603f commit 999538a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/canned-epipred.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,15 @@ arx_lags_validator <- function(predictors, lags) {
5151
}
5252

5353

54+
5455
#' @export
5556
print.alist <- function(x, ...) {
56-
utils::str(x)
57+
nm <- names(x)
58+
for (i in seq_along(x)) {
59+
if (is.null(x[[i]])) x[[i]] <- "NULL"
60+
if (length(x[[i]]) == 0L) x[[i]] <- "_empty_"
61+
cli::cli_bullets(c("*" = "{nm[[i]]} : {.val {x[[i]]}}"))
62+
}
5763
}
5864

5965
#' @export

0 commit comments

Comments
 (0)