fmt_pct: Format percentage

View source: R/fmt.R

fmt_pctR Documentation

Format percentage

Description

Format percentage

Usage

fmt_pct(x, digits = 1, pre = "(", post = ")")

Arguments

x

A numeric vector.

digits

Number of digits.

pre

Text before the number.

post

Text after the number.

Value

A numeric vector with the expected format.

Examples

fmt_pct(c(1, 1.52, 0.3, 100))

Merck/metalite.ae documentation built on Feb. 10, 2025, 5:03 p.m.