Creates a 2-D table (i.e. from 2 factors) in a nice format. Useful for converting to a printable table or determining percentages or totals.
1 2 3 4 |
table |
any 2-D table, or data frame that resembles a table |
name |
Left-most column name (describing rows). Defaults to "" |
rowNames |
names for table rows (pre-sorted) - defaults to table row names |
colNames |
names for table columns (pre-sorted), EXCLUDING leftmost row |
sortRow |
vector of column names/numbers to sort by (highest to lowest) |
sortCol |
vector of column names/numbers to sort by (left to right) |
percent |
convert all values to percentages. Can evaluate percentages by 'row', 'col', or 'all' |
totalRow |
add row indicating total (default is FALSE) |
totalCol |
add column indicating total (default is FALSE) |
totalN |
add (n=#) to row/col names instead of a new row/column (default is FALSE) |
revRow |
reverse order of rows |
revCol |
reverse order of columns |
rmCol |
vector of column names to remove |
botCol |
vector of column names to keep at the right of the table |
rmRow |
vector of row names to remove |
botRow |
vector of row names to keep at the bottom of the table |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.