displayKbyC {reporttools} | R Documentation |
Generate a LaTeX table of a K times C frequency table that contains not only the cell frequencies, but also pre-specified row- and col-names as well as totals of rows and cols.
displayKbyC(v1, v2, names = c("v1", "v2"), cap = "", lab = "", row.nam = NA, col.nam = NA)
v1 |
Vector with integer entries. |
v2 |
Vector with integer entries. |
names |
Names of the vectors under consideration. |
cap |
Caption of the LaTeX table to be generated. |
lab |
Label of the LaTeX table to be generated. |
row.nam |
Labels of v1 to be given as row names. |
col.nam |
Labels of v2 to be given as column names. |
Returns a LaTeX K x C table.
Kaspar Rufibach (maintainer), kaspar.rufibach@gmail.com
set.seed(1977) v1 <- round(runif(20, 0, 3)) v2 <- round(runif(20, 0, 5)) displayKbyC(v1, v2, names = c("v1", "v2"), cap = "", lab = "", row.nam = NA, col.nam = NA)