This code gives a report independently of the variable Session
. How can I obtain two reports, one for each Session
, using a Wilcoxon paired test?
library(tidyverse)
library(report)
df <- tibble(Session = c(rep("1", 10), rep("2", 10)),
scores = sample(20:70, 20),
group = c(rep("before", 5), rep("after",5),
rep("before", 5), rep("after",5)))
wilcox.test(df$scores ~ df$group, paired = TRUE) |> report()
#> Effect sizes were labelled following Funder's (2019) recommendations.
#>
#> The Wilcoxon signed rank exact test testing the difference in ranks between
#> df$scores and df$group suggests that the effect is negative, statistically not
#> significant, and small (W = 24.00, p = 0.770; r (rank biserial) = -0.13, 95% CI
#> [-0.68, 0.52])