tavolo: Create 2 x k frequency tables

Description Usage Arguments Value Examples

Description

Helper function for creating 2 x k frequency tables.

Usage

1

Arguments

df

a dataframe with binary variable y and categorical variable x or a 2 x k frequency table/matrix. If a table or matrix, x and y must be NULL. Used to select method.

...

further arguments passed to or from other methods.

Value

tab

2 x k frequency table

Examples

1
2
3
4
5
trial <- data.frame(disease = c(rep("yes", 2), rep("no", 2)),
                    treatment = c(rep(c("estrogen", "placebo"), 2)),
                    count = c(751, 623, 7755, 7479))

tavolo(trial, treatment, disease, count)

catfun documentation built on June 14, 2019, 5:04 p.m.