add_stats: Add test statistics to output

Description Usage Arguments Examples

Description

Currently this function computes a fisher.test on the data and displays the resulting output next to the crosstab.

Usage

1

Arguments

tab

A cross_table object.

...

Names of statistical tests to perform on the data, i.e. fisher.test or chisq.test. The function must accept a table as input an can be an anonymous function. If no test is supplied, assocstats is performed as default.

Examples

1
2
3
titanic %>%
  crosstab(Survived ~ Sex) %>%
  add_stats()

tklebel/crosstabr documentation built on May 31, 2019, 3:43 p.m.