format_percent: Format percentages

View source: R/formatting_helpers.R

format_percentR Documentation

Format percentages

Description

Format percentages

Usage

format_percent(val, digits = 1)

Arguments

val

Numeric value to format as percentage (0-100 scale)

digits

Number of decimal places (default: 1)

Value

Formatted percentage string

Examples

format_percent(23.456)    # "23.5%"
format_percent(0.234, digits = 2)    # "0.23%"

sensortowerR documentation built on March 18, 2026, 5:07 p.m.