summaries: Add rows or columns summaries

Description Usage Arguments Value Author(s)

View source: R/summaries.R

Description

Add rows or columns summaries (sums or means) to a dataframe.

Usage

1
summaries(x, rows = TRUE, columns = TRUE, omit_col = NA, summary = "sum")

Arguments

x

Dataframe. Data to which you wish to add the totals

rows

Logical. Whether totals should be added at the bottom of the table.

columns

Logical. Whether totals should be added at the right-side of the table.

omit_col

Character vector. Names of the variables not to be included in the total (for instance containing the id of the observation).

summary

Character. Whether the reported statistic should be a "sum" or a "mean".

Value

Tibble with the summary statistics added as a column or a row.

Author(s)

Nicolas Mangin


NicolasJBM/tablR documentation built on June 9, 2021, 5:23 p.m.