txt_mean_range: Summary text functions for html tables

View source: R/txt_mean_range.R

txt_mean_rangeR Documentation

Summary text functions for html tables

Description

Summary text functions for html tables

Usage

txt_mean_range(var, na.rm = TRUE, digits = 1, unicode = T, ...)

Arguments

var

A numeric vector or variable name within a dataframe

na.rm

a logical value indicating whether NA values should be stripped

digits

number of decimal places (limited to 1-3)

Value

A character vector with mean (range), suitable for printing in an html table

See Also

sprintf, mean, min, max

Examples

library(dplyr)
txt_mean_range(mtcars$mpg)
mtcars %>%
  group_by(cyl) %>%
  summarise(mean_mpg = txt_mean_range(mpg))

JMLuther/tabletools documentation built on July 1, 2024, 2:01 p.m.