mat_add_total_row: Add row of total

Description Usage Arguments Examples

View source: R/data.R

Description

Add either sum, or Total (if not numeric)

Usage

1
mat_add_total_row(df, fun = sum, total_name = "Total")

Arguments

df

the data-frame

fun

function, Defaults to sum

total_name

The name, default is "Total"

Examples

1
2
3
data(iris)
iris$Species <- as.character(iris$Species)
mat_add_total_row(iris[1:5,])

MatthieuStigler/matPkg documentation built on Aug. 10, 2021, 11:01 a.m.