powered by
This function makes cross tables, like all functions from fastrep you need to supply a data.frame, and in this case two variables.
cross_tbl(obj, var1, var2, title = "", marg = FALSE)
A knitr_kable with 2x2 table fitted
Object used to create the table. Data frame, list, or environment (or object coercible by as.data.frame to a data frame)
Variable that you want the table (not written in string format)
Variable that you want on the top of the table (not written in string format)
title for the table, write in string format
Marginal row table, default is FALSE
mtcars |> fastrep::cross_tbl(cyl, am, "title", marg = TRUE)
Run the code above in your browser using DataLab