formatPercent {biostatUZH}R 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%"

[Package biostatUZH version 1.8.0 Index]