wrap.rd: Round a number (without leading zeros)

View source: R/wrap.rd.R

wrap.rdR Documentation

Round a number (without leading zeros)

Description

Rounds a number, omits the leading zero, and retains at least one significant digit when possible. (This is a helper function that will be called by other functions in this package.)

Usage

wrap.rd(num, places = 2)

Arguments

num

The number that will be rounded

places

The number of decimal places to which to round the number

Examples

wrap.rd(num = 0.0145, places = 3)


michaelkardas/bwrappers documentation built on Nov. 13, 2022, 1:14 a.m.