report
report copied to clipboard
Custom rule not correctly reported as such
Describe the bug
Custom rules are not reported as such.
To Reproduce
Apply #457 or run the following to get around #456:
f <- report:::.report_effectsize_ttest
body(f)[[6]] <- quote(dot_args$rules <- if(is.null(dot_args$rules)) rules else dot_args$rules)
assignInNamespace(x = ".report_effectsize_ttest", value = f, ns = "report")
Now one can see that a custom rule...
t.test(formula = extra ~ group, data = sleep) |>
report::report(rules = effectsize::rules(1, c("tiny", "yeah okay"), name = "Unknown"))
...is not correctly reported:
Effect sizes were labelled following recommendations.
The Welch Two Sample t-test testing the difference of extra by group (mean in group 1 = 0.75, mean in group 2
= 2.33) suggests that the effect is negative, statistically not significant, and tiny (difference = -1.58,
95% CI [-3.37, 0.21], t(17.78) = -1.86, p = 0.079; Cohen's d = -0.88, 95% CI [-1.84, 0.10])
Expected behaviour
https://github.com/easystats/report/blob/69e8c5ffb9ad494683c769f46974fbff794f2fc4/R/report_effectsize.R#L111