Skip to content

Commit

Permalink
Fix using a custom rule (#457)
Browse files Browse the repository at this point in the history
* Fix using a custom rule

`ifelse()` is unsafe because it silently only returns the first element of `no` if `test` is of length 1.

* Add space before parenthesis

---------

Co-authored-by: Brenton M. Wiernik <[email protected]>
Co-authored-by: Rémi Thériault <[email protected]>
  • Loading branch information
3 people authored Sep 13, 2024
1 parent 52903ed commit f2bb5fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/report_htest_ttest.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
table <- do.call(effectsize::effectsize, es_args)
ci <- attributes(table)$ci
estimate <- names(table)[1]
dot_args$rules <- ifelse(is.null(dot_args$rules), rules, dot_args$rules)
dot_args$rules <- if (is.null(dot_args$rules)) rules else dot_args$rules

es_args <- c(list(table), dot_args)
interpretation <- do.call(effectsize::interpret, es_args)$Interpretation
Expand Down

0 comments on commit f2bb5fb

Please sign in to comment.