trim_n: Trim Number

Description Usage Arguments Value Examples

View source: R/formats.R

Description

Format number to n decimal places

Usage

1
trim_n(x, n_dec = 1)

Arguments

x

Numeric to be formatted.

n_dec

Numeric for number of digits to format after the decimal.

Value

The formatted x.

Examples

1
2
trim_n(pi, 3)
trim_n(1.2345, 1)

dgrisafe/styledom documentation built on April 9, 2021, 5:44 a.m.