Learn R Programming

usefun (version 0.5.2)

specify_decimal: 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)

Value

the pruned number in string format

Arguments

number

numeric

digits.to.keep

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

Examples

Run this code
# 0.123
specify_decimal(0.1233213, 3)

Run the code above in your browser using DataLab