Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

Tex4exams (version 0.1.2)

fmtN: Convert a decimal number into exactly n decimal places.

Description

Convert a decimal number into exactly n decimal places without scientific notation.

Usage

fmtN(x,n)

Value

A decimal number rounded into exactly n decimal places.

Arguments

x,n

where x is a decimal number and n is the numbers of decimal places to keep.

Details

Round a decimal number into exactly n decimal places.

See Also

fmt4 is a special case of fmtN but is simpler to use with one argument.

Examples

Run this code
x <- sin (sample(c(1:5),1))
n <- sample(c(4:10),1)

fmtN(x,n)

Run the code above in your browser using DataLab