fmt_percent: Formats percentages to be displayed in tables or text of...

Description Usage Arguments Value Examples

Description

Formats percentages to be displayed in tables or text of report.

Usage

1

Arguments

x

numeric vector of percentages

symbol

logical indicator to include percent symbol in output. Default is FALSE.

Value

Formatted percentages

Examples

1
2
3
percent_vals <- c(-1, 0, 0.0001, 0.005, 0.01, 0.10, 0.45356, 0.99, 1.45)
fmt_percent(percent_vals)
fmt_percent(percent_vals, symbol = TRUE)

ddsjoberg/gtsummary-v0.1 documentation built on June 4, 2019, 7:48 a.m.