choose_test: Choose the correct statistical test

Description Usage Arguments Details Value Examples

View source: R/comparison.R

Description

Selects the correct statistical test for a provided dataframe column.

Usage

1

Arguments

df

a data frame

group

a grouping variable to split the records in col and test by.

col

a column to be tested

Details

currently does not work with factors, only logicals and numerics.

Value

a list of class htest representing the results of either chisq.test or t.test

Examples

1
mtcars %>% dplyr::group_by(hp > 150) %>% choose_test(`hp > 150`, mpg)

dylanrussellmd/nsqipBileSpill documentation built on Dec. 20, 2021, 2:17 a.m.