Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
rempsyc committed Sep 24, 2023
1 parent d0c3d43 commit e4968eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/report_htest_chi2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ", "
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-report.htest-chi2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit e4968eb

Please sign in to comment.