Skip to content

Commit

Permalink
fix #622
Browse files Browse the repository at this point in the history
  • Loading branch information
mattansb committed Dec 5, 2023
1 parent 8fdbfad commit 8b5636f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
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: 0.8.6.3
Version: 0.8.6.4
Authors@R:
c(person(given = "Mattan S.",
family = "Ben-Shachar",
Expand Down
2 changes: 1 addition & 1 deletion R/utils_validate_input_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
return(mf)
}

if (verbose && any(tapply(mf[[1]], mf[3:2], length) > 1L)) {
if (verbose && any(tapply(mf[[1]], mf[3:2], length) > 1L, na.rm = TRUE)) {
insight::format_alert(
paste0("The ", method, " standardized difference requires paired data,"),
"but data contains more than one observation per design cell.",
Expand Down
6 changes: 6 additions & 0 deletions tests/testthat/test-rm_d.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ test_that("rm_d | paired data", {
regexp = "replications"
)

sleep[1, "extra"] <- NA
sleep2[1, "extra.1"] <- NA
expect_no_error(d1NA <- rm_d(extra ~ group | ID, data = sleep))
expect_no_error(d2NA <- rm_d(Pair(extra.1, extra.2) ~ 1, data = sleep2))
expect_equal(d1NA, d2NA)


# equal with equal variance:
dat <- data.frame(
Expand Down

0 comments on commit 8b5636f

Please sign in to comment.