From e4968eb1b1c71f7c91d2fad1afddf4b465d5656f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Th=C3=A9riault?= <13123390+rempsyc@users.noreply.github.com> Date: Sun, 24 Sep 2023 10:21:45 -0400 Subject: [PATCH] lints --- R/report_htest_chi2.R | 2 +- tests/testthat/test-report.htest-chi2.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/report_htest_chi2.R b/R/report_htest_chi2.R index a9f35306..0251bcf9 100644 --- a/R/report_htest_chi2.R +++ b/R/report_htest_chi2.R @@ -80,7 +80,7 @@ } else if (chi2_type(x) == "probabilities") { type <- " / goodness of fit of " dist <- ifelse( - grepl("non", attr(table, "table_footer")), "a uniform distribution", + grepl("non", attr(table, "table_footer"), fixed = TRUE), "a uniform distribution", paste0("a distribution of [", paste0( names(x$expected), ": n=", x$expected, collapse = ", " diff --git a/tests/testthat/test-report.htest-chi2.R b/tests/testthat/test-report.htest-chi2.R index 27502503..9c401704 100644 --- a/tests/testthat/test-report.htest-chi2.R +++ b/tests/testthat/test-report.htest-chi2.R @@ -188,7 +188,7 @@ test_that("report.htest-chi2 report", { # Watch carefully in case effectsize adds support # Mattan example comparison - suppressWarnings(x <- chisq.test(mtcars$cyl, mtcars$am)) + x <- suppressWarnings(chisq.test(mtcars$cyl, mtcars$am)) expect_snapshot( variant = "windows", @@ -198,7 +198,7 @@ test_that("report.htest-chi2 report", { test_that("report.htest-chi2 for given probabilities", { # Mattan example comparison - suppressWarnings(x <- chisq.test(table(mtcars$cyl), p = c(0.1, 0.3, 0.6))) + x <- suppressWarnings(chisq.test(table(mtcars$cyl), p = c(0.1, 0.3, 0.6))) expect_snapshot( variant = "windows",