choose_test.Rd
Selects the correct statistical test for a provided dataframe column.
choose_test(df, group, col)
df | a data frame |
---|---|
group | a grouping variable to split the records in |
col | a column to be tested |
a list of class htest
representing the results of either chisq.test
or t.test
currently does not work with factors, only logicals and numerics.
#> #> Welch Two Sample t-test #> #> data: mpg by hp > 150 #> t = 5.239, df = 28.746, p-value = 1.338e-05 #> alternative hypothesis: true difference in means between group FALSE and group TRUE is not equal to 0 #> 95 percent confidence interval: #> 4.799001 10.949177 #> sample estimates: #> mean in group FALSE mean in group TRUE #> 23.28947 15.41538 #>