tests_auto: Function to choose a statistical test

View source: R/tests.R

tests_autoR Documentation

Function to choose a statistical test

Description

This function takes a variable and a grouping variable as arguments, and returns a statistcal test to use, expressed as a single-term formula.

Usage

tests_auto(var, grp)

Arguments

var

The variable to test

grp

The variable for the groups

Details

This function uses appropriate non-parametric tests depending on the number of levels (wilcoxon.test for two levels and kruskal.test for more), and fisher.test with fallback on chisq.test on error for factors.

Value

A statistical test function


MaximeWack/desctable documentation built on April 6, 2022, 5:38 a.m.