report.propTable: Create a contingency table

View source: R/report.propTable.R

report.propTableR Documentation

Create a contingency table

Description

The function print the contingency table with columns sums or rowsums.

Usage

report.propTable(x, y, margin = NULL, dec = 1)

Arguments

x

First categorical variable.

y

Second categorical variable.

margin

Index to generate margin for. If NULL, then simple probabilities (non-conditional) are reported.

dec

The number of decimal places to round the values.

Author(s)

Marjan Cugmas

Examples

report.propTable(x = mtcars$gear, y = mtcars$carb, margin = 1, dec = 2)

handyReport documentation built on Oct. 8, 2024, 3 p.m.