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)


usefun documentation built on Sept. 15, 2024, 1:06 a.m.