mat_add_total_row: Add row of total

View source: R/data.R

mat_add_total_rowR Documentation

Add row of total

Description

Add either sum, or Total (if not numeric)

Usage

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

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

MatthieuStigler/matPkg documentation built on Nov. 13, 2023, 7:53 p.m.