From 2eeaa7e9eab26338ed2de693fd09a82af907d6f7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 21 Nov 2024 13:20:28 +0100 Subject: [PATCH] typo --- R/find_formula.R | 4 ++-- man/find_formula.Rd | 2 +- tests/testthat/test-backticks.R | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/find_formula.R b/R/find_formula.R index 1771e92502..794db775fc 100644 --- a/R/find_formula.R +++ b/R/find_formula.R @@ -23,7 +23,7 @@ #' - `"index"`: Check if formula contains indexed data frames as response #' variable (e.g., `df[, 5] ~ x`). #' - `"name"`: Check if invalid syntactically variables names were used and -#' enquoted in backticks. +#' quoted in backticks. #' - `"all"`: Checks all of the above mentioned options. #' #' @param ... Currently not used. @@ -1995,7 +1995,7 @@ find_formula.model_fit <- function(x, verbose = TRUE, ...) { if (verbose) { bad_name <- gsub("(.*)`(.*)`(.*)", "\\2", resp) format_warning(paste0( - "Looks like you are using invalid syntactically variables names, enquoted in backticks: `", + "Looks like you are using invalid syntactically variables names, quoted in backticks: `", bad_name, "`. This may result in unexpected behaviour. Please rename your variables (e.g., `", make.names(bad_name), diff --git a/man/find_formula.Rd b/man/find_formula.Rd index 3fc1aff6ff..bc4f652724 100644 --- a/man/find_formula.Rd +++ b/man/find_formula.Rd @@ -32,7 +32,7 @@ which is not intended. \item \code{"index"}: Check if formula contains indexed data frames as response variable (e.g., \code{df[, 5] ~ x}). \item \code{"name"}: Check if invalid syntactically variables names were used and -enquoted in backticks. +quoted in backticks. \item \code{"all"}: Checks all of the above mentioned options. }} diff --git a/tests/testthat/test-backticks.R b/tests/testthat/test-backticks.R index 261d21c5bd..27f75203e4 100644 --- a/tests/testthat/test-backticks.R +++ b/tests/testthat/test-backticks.R @@ -65,7 +65,7 @@ withr::with_environment( ) ) expect_identical( - find_predictors(m), + find_predictors(m, verbose = FALSE), list(conditional = c("Petal.Length", "a m", "Sepal.Length")) ) expect_identical(