diff --git a/DESCRIPTION b/DESCRIPTION index c2cd6668c..057c7ab23 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: modelbased Title: Estimation of Model-Based Predictions, Contrasts and Means -Version: 0.17.0.20 +Version: 0.18.0 Authors@R: c(person(given = "Dominique", family = "Makowski", diff --git a/NEWS.md b/NEWS.md index a88fe66fa..d497a6dca 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# modelbased (devel) +# modelbased 0.18.0 ## Breaking Changes diff --git a/tests/testthat/test-visualisation_recipe.R b/tests/testthat/test-visualisation_recipe.R index 85e1f4a76..e92ae46de 100644 --- a/tests/testthat/test-visualisation_recipe.R +++ b/tests/testthat/test-visualisation_recipe.R @@ -292,7 +292,9 @@ test_that("visualization_recipe, emmeans ordinal, color by Response", { expect_null(out$facet) expect_true("scale_y_continuous" %in% out$geoms) expect_identical(attributes(x)$focal_terms, "Infl") - if (backend == "emmeans") .expect_same_print(x) + if (backend == "emmeans") { + .expect_same_print(x) + } x <- estimate_means(m, by = c("Infl", "Type"), backend = backend) out <- .recipe_mapping(x) @@ -472,16 +474,30 @@ test_that("visualization_recipe, emmeans, recipes that do not change", { test_that("visualization_recipe, informative error when nothing goes on x-axis", { + # fails on R 4.5.1 + # Error in `match(x, table, nomatch = 0L)`: 'match' requires vector arguments + # Backtrace: + # ▆ + # 1. ├─testthat::expect_error(...) at test-visualisation_recipe.R:496:3 + # 2. │ └─testthat:::expect_condition_matching_(...) + # 3. │ └─testthat:::quasi_capture(...) + # 4. │ ├─testthat (local) .capture(...) + # 5. │ │ └─base::withCallingHandlers(...) + # 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) + # 7. ├─datawizard::visualisation_recipe(...) + # 8. └─modelbased:::visualisation_recipe.estimate_means(...) + # 9. └─modelbased:::.visualization_recipe(...) + # 10. └─modelbased:::.find_aes(x, model_info, numeric_as_discrete) + # 11. ├─by[by %in% colnames(data)] + # 12. ├─stats:::`[.formula`(by, by %in% colnames(data)) + # 13. ├─base::NextMethod("[") + # 14. └─by %in% colnames(data) + + skip_on_cran() # intercept-only model model <- lm(qsec ~ 1, data = mtcars) - expect_error( - visualisation_recipe(estimate_prediction(model)), - regex = "intercept-only" - ) - expect_error( - visualisation_recipe(estimate_relation(model)), - regex = "intercept-only" - ) + expect_error(visualisation_recipe(estimate_prediction(model)), regex = "intercept-only") + expect_error(visualisation_recipe(estimate_relation(model)), regex = "intercept-only") # no `by` variable model <- lm(qsec ~ wt, data = mtcars) expect_error(