rndformat: Round and format a number to the same number of digits.

Description Usage Arguments Value Examples

View source: R/rndformat.R

Description

Round and format a number to the same number of digits.

Usage

1
rndformat(x, digits = 2)

Arguments

x

Numeric; value to be rounded and formatted

digits

Numeric; number of digits to round and format x to

Value

Character string of x, rounded and formatted to the same number of digits.

Examples

1
2
rndformat(1.9727, digits = 3)
rndformat(1.2, digits = 3)

jenniferthompson/JTHelpers documentation built on May 19, 2019, 4:04 a.m.