Skip to content

Commit f2bb5fb

Browse files
fkohrtbwiernikrempsyc
authored
Fix using a custom rule (#457)
* 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 <bwiernik@users.noreply.github.com> Co-authored-by: Rémi Thériault <13123390+rempsyc@users.noreply.github.com>
1 parent 52903ed commit f2bb5fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/report_htest_ttest.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
table <- do.call(effectsize::effectsize, es_args)
4949
ci <- attributes(table)$ci
5050
estimate <- names(table)[1]
51-
dot_args$rules <- ifelse(is.null(dot_args$rules), rules, dot_args$rules)
51+
dot_args$rules <- if (is.null(dot_args$rules)) rules else dot_args$rules
5252

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

0 commit comments

Comments
 (0)