percentage: Print a decimal number in procent format

Description Usage Arguments Value Examples

View source: R/percentage.R

Description

Print a decimal number in procent format

Usage

1
percentage(x, fmt = "1.1")

Arguments

x

a decimal number, usually between -1 and 1

fmt

format string, '1.1' means a digit before and after the decimal point will be printed

Value

Character string

Examples

1
2
3
percentage(c(0,0.1,0.25,1))
percentage(c(0,0.1,0.25,1), fmt="1.4")
percentage(c(0,-0.1,0.25,-1), fmt="+1.1")

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.