perc: Convert a value (or a fraction x/y) in percentage

View source: R/miscellanous.R

percR Documentation

Convert a value (or a fraction x/y) in percentage

Description

lifecycle-maturing

Mostly for internal use.

Usage

perc(x, y = NULL, accuracy = 0, add_symbol = FALSE)

Arguments

x

(required) value

y

if y is set, compute the division of x by y

accuracy

number of digits (number of digits after zero)

add_symbol

if set to TRUE add the % symbol to the value

Value

The percentage value (number or character if add_symbol is set to TRUE)

Author(s)

Adrien Taudière

Examples

perc(0.75)
perc(3, 10)
perc(0.75, add_symbol = TRUE)

MiscMetabar documentation built on June 8, 2026, 5:07 p.m.