percent: Format numbers to percent

Description Usage Arguments See Also Examples

View source: R/percent.R

Description

Formats a numeric vector to percentage string vector.

Usage

1
percent(x, digits = 2, format = "f", ...)

Arguments

x

A numeric vector.

digits

An integer to define the number of dicimals, default is 2.

format

A string define the format argument for using the formatC function.

...

Arguments passed to formatC.

See Also

formatC and sprintf

Examples

1
percent(1:3, 1)

kang-yu/lazyu documentation built on May 30, 2019, 11:42 a.m.