Two-group test
twotest(var, group)
No return value
twotest(runif(20), rep(c("a", "b"), each = 10))
#>
#> Welch Two Sample t-test
#>
#> data: var by group
#> t = -0.074862, df = 17.999, p-value = 0.9412
#> alternative hypothesis: true difference in means between group a and group b is not equal to 0
#> 95 percent confidence interval:
#> -0.2687888 0.2502925
#> sample estimates:
#> mean in group a mean in group b
#> 0.5377844 0.5470326
#>
#> ================================================================================
#>
#> Wilcoxon rank sum exact test
#>
#> data: var by group
#> W = 49, p-value = 0.9705
#> alternative hypothesis: true location shift is not equal to 0
#>
#> ================================================================================
#>
#> Exact two-sample Kolmogorov-Smirnov test
#>
#> data: var by group
#> D = 0.2, p-value = 0.9945
#> alternative hypothesis: two-sided
#>