Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: effectsize
Title: Indices of Effect Size
Version: 1.0.1.2
Version: 1.0.2
Authors@R:
c(person(given = "Mattan S.",
family = "Ben-Shachar",
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# effectsize 1.0.x
# effectsize 1.0.2

## New features

Expand Down
7 changes: 3 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

## Test environments

* local installation: R 4.4.1 on Windows 11 x64
* local installation: R 4.5.2 on Windows 11 x64
* GitHub Actions
- Windows: release, devel
- macOS: release
Expand All @@ -16,7 +16,6 @@

## revdepcheck results

We checked 28 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems related to effectsize.
We checked 37 reverse dependencies (34 from CRAN + 3 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems related to effectsize.
23 changes: 13 additions & 10 deletions tests/testthat/test-effectsize.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
model <- t.test(x, y)
expect_equal(
effectsize(model),
d <- cohens_d(x, y, pooled_sd = FALSE),

Check warning on line 9 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=9,col=5,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
ignore_attr = TRUE
)
expect_equal(cohens_d(model), d, ignore_attr = TRUE)
Expand Down Expand Up @@ -94,19 +94,19 @@
y <<- c(1, 1:3)
Tt <- t.test(x, y, var.equal = TRUE)

expect_equal(e <- p_superiority(Tt), p_superiority(x, y), ignore_attr = TRUE)

Check warning on line 97 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=97,col=16,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
expect_equal(effectsize(Tt, type = "p_superiority"), e)

Check warning on line 98 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=98,col=3,[expect_identical_linter] Use expect_identical(x, y) by default; resort to expect_equal() only when needed, e.g. when setting ignore_attr= or tolerance=.

expect_equal(e <- cohens_u1(Tt), cohens_u1(x, y), ignore_attr = TRUE)

Check warning on line 100 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=100,col=16,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
expect_equal(effectsize(Tt, type = "u1"), e)

Check warning on line 101 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=101,col=3,[expect_identical_linter] Use expect_identical(x, y) by default; resort to expect_equal() only when needed, e.g. when setting ignore_attr= or tolerance=.

expect_equal(e <- cohens_u2(Tt), cohens_u2(x, y), ignore_attr = TRUE)

Check warning on line 103 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=103,col=16,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
expect_equal(effectsize(Tt, type = "u2"), e)

Check warning on line 104 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=104,col=3,[expect_identical_linter] Use expect_identical(x, y) by default; resort to expect_equal() only when needed, e.g. when setting ignore_attr= or tolerance=.

expect_equal(e <- cohens_u3(Tt), cohens_u3(x, y), ignore_attr = TRUE)

Check warning on line 106 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=106,col=16,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
expect_equal(effectsize(Tt, type = "u3"), e)

Check warning on line 107 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=107,col=3,[expect_identical_linter] Use expect_identical(x, y) by default; resort to expect_equal() only when needed, e.g. when setting ignore_attr= or tolerance=.

expect_equal(e <- p_overlap(Tt), p_overlap(x, y), ignore_attr = TRUE)

Check warning on line 109 in tests/testthat/test-effectsize.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=tests/testthat/test-effectsize.R,line=109,col=16,[implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
expect_equal(effectsize(Tt, type = "overlap"), e)
})

Expand Down Expand Up @@ -390,12 +390,12 @@
expect_equal(rank_epsilon_squared(kt)[[1]], E, ignore_attr = TRUE)
})

test_that("htest | Get args from htest", {
test_that("htest | Get args from htest (t.test)", {
tt <- t.test(
mtcars$hp,
mtcars$mpg,
alternative = "l",
mu = -3,
mu = 100,
conf.level = 0.8,
var.equal = TRUE
)
Expand All @@ -405,18 +405,20 @@
mtcars$hp,
mtcars$mpg,
alternative = "l",
mu = -3,
mu = 100,
ci = 0.8
),
ignore_attr = TRUE
)
})

test_that("htest | Get args from htest (wilcox.test)", {
suppressWarnings({
ww1 <- wilcox.test(mtcars$hp, mtcars$mpg, alternative = "l", mu = -3)
ww1 <- wilcox.test(mtcars$hp, mtcars$mpg, alternative = "l", mu = 80)
})
expect_equal(
rank_biserial(ww1),
rank_biserial(mtcars$hp, mtcars$mpg, alternative = "l", mu = -3),
rank_biserial(mtcars$hp, mtcars$mpg, alternative = "l", mu = 80),
ignore_attr = TRUE
)

Expand All @@ -425,9 +427,9 @@
mtcars$hp,
mtcars$mpg,
alternative = "l",
mu = -3,
mu = 80,
conf.int = TRUE,
conf.level = 0.8
conf.level = 0.7
)
})
expect_equal(
Expand All @@ -436,10 +438,11 @@
mtcars$hp,
mtcars$mpg,
alternative = "l",
mu = -3,
ci = 0.8
mu = 80,
ci = 0.7
),
ignore_attr = TRUE
ignore_attr = TRUE,
tolerance = 0.01
)
})

Expand Down
Loading