formatPercent: Format a Numeric Proportion

View source: R/formatPercent.R

formatPercentR Documentation

Format a Numeric Proportion

Description

Takes a number and formats it as a percentage. Used by confIntIndependentProportion.

Usage

formatPercent(x, digits = 1)

Arguments

x

numeric vector of proportions

digits

number of digits

Author(s)

Leonhard Held

Examples


formatPercent(c(0.115, 0.5))  # "11.5%" "50.0%"


felix-hof/biostatUZH documentation built on Sept. 27, 2024, 1:48 p.m.