cross_tbl {fastrep} | R Documentation |
cross_tbl
Description
This function makes cross tables, like all functions from fastrep you need to supply a data.frame, and in this case two variables.
Usage
cross_tbl(obj, var1, var2, title = "", marg = FALSE)
Arguments
obj |
Object used to create the table. Data frame, list, or environment (or object coercible by as.data.frame to a data frame) |
var1 |
Variable that you want the table (not written in string format) |
var2 |
Variable that you want on the top of the table (not written in string format) |
title |
title for the table, write in string format |
marg |
Marginal row table, default is FALSE |
Value
A knitr_kable with 2x2 table fitted
Examples
mtcars |>
fastrep::cross_tbl(cyl, am, "title", marg = TRUE)
[Package fastrep version 0.7 Index]