Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pilltabs

Given a cross-table, outputs HTML code to display several views of with a tabbed interface


Description

Given a two dimensions contingency tables, this function outputs HTML code to display, within a dynamic tabbed interface, the count, line row percentages, column percentages and chi-squared residuals tables.

Usage

pilltabs(
  tab,
  count = TRUE,
  rows = TRUE,
  cols = TRUE,
  chisq = TRUE,
  resid = TRUE,
  row.names = TRUE
)

Arguments

tab

a two dimensions table object

count

whether or not to display the count table

rows

whether or not to display the row percentages table

cols

whether or not to display the column percentages table

chisq

whether or not to display the table chi-squared test results

resid

whether or not to display the chi-squared residuals table

row.names

whether or not to display the table row names

Details

The function is intended to be called inside an rmarkdown document.

Value

No value is returned.

Examples

data(airquality)
tab <- table(airquality$Month, airquality$Ozone > 25)
pilltabs(tab)

rmdformats

HTML Output Formats and Templates for 'rmarkdown' Documents

v1.0.2
GPL (>= 2)
Authors
Julien Barnier [aut, cre]
Initial release
2021-04-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.