Round: Round and don't drop trailing zeros

View source: R/misc_fns.R

RoundR Documentation

Round and don't drop trailing zeros

Description

Shorter wrapper for format(x, digits = n, nsmall = n)

Usage

Round(x, n)

Arguments

x

numeric to be formatted

n

number of digits for nsmall

Details

should not be used unless digits after a decimal are needed. Note for numbers with leading zeros (ie. 0.0349) you will get one more decimal place than n. (ie. Round(O.0349, 2) will return 0.035)

Value

a character vector of same length of x converted


CIDA-CSPH/CIDAtools documentation built on Sept. 18, 2023, 10:55 a.m.