FormatPercent: Format a Number as a Percentage

View source: R/util.R

FormatPercentR Documentation

Format a Number as a Percentage

Description

This utility method can be used as a format function when converting trees to a data.frame

Usage

FormatPercent(x, digits = 2, format = "f", ...)

Arguments

x

A number

digits

The number of digits to print

format

The format to use

...

Any other argument passed to formatC

Value

A string corresponding to x, suitable for printing

See Also

formatC

Examples

data(acme)
print(acme, prob = acme$Get("p", format = FormatPercent))


data.tree documentation built on Nov. 13, 2023, 1:08 a.m.