chisq_row: Row using chi squared test

chisq_rowR Documentation

Row using chi squared test

Description

Row using chi squared test

Usage

chisq_row(
  data_item,
  data = NULL,
  data_filter = NULL,
  row_digits = NULL,
  na.rm = TRUE,
  reference_level = NULL,
  include_reference = TRUE,
  include_denom = NULL,
  percent_first = NULL,
  cat_out_of_row = NULL
)

Arguments

data_item

item to be taken from data for row

data

separate dataset to use

data_filter

filter to apply to dataset

row_digits

digits for data item (overrides table as a whole)

na.rm

whether to include NA in the denominator for percentages

reference_level

a level of the variable to drop from display

include_reference

whether to include the first level of the factor in the report

include_denom

whether to include the denominator for categorical variables

percent_first

whether to put the percent before the n for categorical variables

cat_out_of_row

whether percentages in categories should be calculated out of row rather than column

Examples

first_table(
  mtcars,
  .column_variable = cyl,
  chisq_row(gear, row_digits = 2, include_reference = TRUE)
)

NikNakk/tableone documentation built on March 22, 2022, 1:19 p.m.