table_values(tab, digits = 2)
cell
a table with cell percentages of tab
row
a table with row percentages of tab
col
a table with column percentages of tab
expected
a table with expected values of tab
tab <- table(sample(1:2, 30, TRUE), sample(1:3, 30, TRUE))
# show expected values
table_values(tab)$expected
# show cell percentages
table_values(tab)$cell
Run the code above in your browser using DataLab