Skip to content

Commit

Permalink
Update t_test.R
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke authored May 10, 2024
1 parent 716e9d2 commit 15344fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/t_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ t_test <- function(data,
# prepare data
if (is.null(grp)) {
tdat <- data.frame(dv)
t_formula <- as.formula("dv ~ 1")
t_formula <- stats::as.formula("dv ~ 1")
} else {
tdat <- data.frame(dv, grp)
t_formula <- as.formula("dv ~ grp")
t_formula <- stats::as.formula("dv ~ grp")
}
# perfom wilcox test
htest <- stats::t.test(
Expand Down Expand Up @@ -230,9 +230,9 @@ t_test <- function(data,
# effect size
dat$y <- dat$y * dat$w
if (is.null(y_values)) {
t_formula <- as.formula("y ~ 1")
t_formula <- stats::as.formula("y ~ 1")
} else {
t_formula <- as.formula("y ~ g")
t_formula <- stats::as.formula("y ~ g")
}

if (nrow(dat) > 20) {
Expand Down

0 comments on commit 15344fb

Please sign in to comment.