tavolo {catfun} | R Documentation |
Create 2 x k frequency tables
Description
Helper function for creating 2 x k frequency tables.
Usage
tavolo(df, ...)
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
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)
[Package catfun version 0.1.4 Index]