Description Usage Arguments Value
A function to add column and row totals to a dataframe. Assumes character columns followed by all numeric columns.
1 | add_margins(df, rowsum = TRUE)
|
df |
Dataframe to add margins to. |
rowsum |
Boolean to indicate if you want row sums in a Total column. Defaults to TRUE. |
Returns dataframe with margins added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.