Skip to content

Commit

Permalink
Message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneoberman committed Dec 21, 2023
1 parent 58d832c commit 22f0828
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/plot_pred.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ plot_pred <-
verify_data(data, pred = TRUE, imp = TRUE)
if (mice::is.mids(data)) {
if (!is.null(method)) {
cli::cli_warn(c(
"!" = "`method` is ignored when `data` is of class `mids`.",
"i" = "The `method` vector from the `mids` object will be used."
))
cli::cli_warn(
c("!" = "Input `method` is ignored when `data` is of class `mids`.",
"i" = "The `method` vector from the `mids` object will be used.")
)
}
method <- data$method
data <- data$predictorMatrix
Expand All @@ -45,7 +45,8 @@ plot_pred <-
ylabel <- ""
}
if (!is.character(method) || length(method) != p) {
cli::cli_abort("Method should be NULL or a character string or vector (of length 1 or `ncol(data)`).")
cli::cli_abort("Method should be `NULL` or a character string or vector
(of length 1 or `ncol(data)`).")
}
vrb <- substitute(vrb)
if (vrb[1] == "all") {
Expand Down

0 comments on commit 22f0828

Please sign in to comment.