Learn R Programming

usefun (version 0.4.1)

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)

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

Run this code
# NOT RUN {
# 0.123
specify_decimal(0.1233213, 3)

# }

Run the code above in your browser using DataLab