{
# Data preparation
testdata <- data.frame(
treatment = c(rep("A", 6), rep("B", 6)),
subject = rep(1:6, 2),
value = c(rnorm(6, 2), rnorm(6, 1))
)
# Wilcoxon test (unpaired)
wilcox_result <- wilcox_test_report(
data = testdata,
treatment_col = 1,
value_col = 3
)
# Wilcoxon signed rank test (paired)
wilcox_result <- wilcox_test_report(
data = testdata,
treatment_col = 1,
value_col = 3,
paired = TRUE,
subject_col = 2
)
### Basic data description ###
print(wilcox_result)
}
Run the code above in your browser using DataLab