From 1f83a362430809b8d88449f48ab9c9bc1fd4dbba Mon Sep 17 00:00:00 2001 From: "Simon P. Couch" Date: Fri, 23 Aug 2024 09:11:32 -0500 Subject: [PATCH] apply suggestions from review --- R/glmnet-engines.R | 2 +- R/logistic_reg.R | 2 +- R/mlp.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/glmnet-engines.R b/R/glmnet-engines.R index 14f7a587d..296468e49 100644 --- a/R/glmnet-engines.R +++ b/R/glmnet-engines.R @@ -388,7 +388,7 @@ format_glmnet_multinom_class <- function(pred, penalty, lvl, n_obs) { if (!multi) { if (length(penalty) != 1) { cli::cli_abort(c( - "{.var penalty} should be a single numeric value.", + "{.arg penalty} should be a single numeric value.", "i" = "{.fn multi_predict} can be used to get multiple predictions per row of data." )) } diff --git a/R/logistic_reg.R b/R/logistic_reg.R index 451d19526..6d0f6c6d8 100644 --- a/R/logistic_reg.R +++ b/R/logistic_reg.R @@ -98,7 +98,7 @@ translate.logistic_reg <- function(x, engine = x$engine, ...) { } else if (quo_get_expr(x$args$mixture) == 1) { arg_vals$type <- 6 ## lasso } else { - cli::cli_abort("For the LiblineaR engine, {.var mixture} must be 0 or 1.") + cli::cli_abort("For the LiblineaR engine, {.arg mixture} must be 0 or 1.") } } x$method$fit$args <- arg_vals diff --git a/R/mlp.R b/R/mlp.R index 6ed148390..b35dbe32c 100644 --- a/R/mlp.R +++ b/R/mlp.R @@ -196,7 +196,7 @@ keras_mlp <- if (penalty > 0 & dropout > 0) { cli::cli_abort("Please use either dropout or weight decay.", call = NULL) - } + } if (!is.matrix(x)) { x <- as.matrix(x) }