table_values | R Documentation |
This function calculates a table's cell, row and column percentages as well as expected values and returns all results as lists of tables.
table_values(tab, digits = 2)
tab |
Simple |
digits |
Amount of digits for the table percentage values. |
(Invisibly) returns a list with four tables:
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.