specify_decimal: Specify decimal

View source: R/others.R

specify_decimalR Documentation

Specify decimal

Description

Use this function to transform a given decimal number to the desired precision by choosing the number of digits after the decimal point.

Usage

specify_decimal(number, digits.to.keep)

Arguments

number

numeric

digits.to.keep

numeric. Refers to the digits to keep after decimal point '.'. This value should be 15 or less.

Value

the pruned number in string format

Examples

# 0.123
specify_decimal(0.1233213, 3)


bblodfon/usefun documentation built on Sept. 17, 2023, 4:37 p.m.