set_total_row_label {Tplyr}R Documentation

Set the label for the total row

Description

The row label for a total row defaults to "Total", however this can be overriden using this function.

Usage

set_total_row_label(e, total_row_label)

Arguments

e

A count_layer object

total_row_label

A character to label the total row

Value

The modified count_layer object

Examples

# Load in pipe
library(magrittr)

t <- tplyr_table(mtcars, gear) %>%
  add_layer(
    group_count(cyl) %>%
      add_total_row() %>%
      set_total_row_label("Total Cyl")
  )
build(t)

[Package Tplyr version 1.2.1 Index]