dp: Specify decimal places for printing

View source: R/formatting-utils.R

dpR Documentation

Specify decimal places for printing

Description

This function specifies the number of decimal places to print (when\ passed to the accuracy argument of nmbr() and related functions).

Usage

dp(n)

Arguments

n

Number of decimal places to print. Use negative values for positive powers of 10; e.g. n = -2 will print values rounded to the nearest multiple of 100.

Value

A vector of the same length as n, suitable to be passed to the accuracy argument of nmbr() and related functions.

See Also

sf, number-formatting


uo-cmor/formattr documentation built on Sept. 13, 2023, 10:46 p.m.