Skip to content

Commit

Permalink
styler, lints
Browse files Browse the repository at this point in the history
  • Loading branch information
rempsyc committed Aug 20, 2023
1 parent 0e66d07 commit e7dd792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/cohens_d.R
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ glass_delta <- function(x, y = NULL, data = NULL,
}

out <- data.frame(d = (d - mu) / s)
types <- c("d" = "Cohens_d", "g" = "Hedges_g", "delta" = "Glass_delta")
types <- c(d = "Cohens_d", g = "Hedges_g", delta = "Glass_delta")
colnames(out) <- types[type]

if (.test_ci(ci)) {
Expand Down
7 changes: 2 additions & 5 deletions tests/testthat/test-htest_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ test_that("subset and na.action", {
na.action = na.omit
)

expect_equal(d1_paired, d2_paired)
expect_identical(d1_paired, d2_paired)

# wilcox.test
x <- wilcox.test(
Expand Down Expand Up @@ -201,7 +201,7 @@ test_that("subset and na.action", {
wb <- aggregate(warpbreaks$breaks, by = list(
w = warpbreaks$wool, t = warpbreaks$tension
), FUN = mean)
new_row <- data.frame(w = "B", t = "H", x = 99)
new_row <- data.frame(w = "B", t = "H", x = 99, stringsAsFactors = FALSE)
wb <- rbind(wb, wb[6, ], new_row)
wb$x[7] <- NA

Expand Down Expand Up @@ -264,7 +264,4 @@ test_that("subset and na.action", {
# using the S3 method instead of the formula interface because no other
# dataframe is provided on which to do the subsetting. So no test is
# necessary here.

})


0 comments on commit e7dd792

Please sign in to comment.