fmtN {Tex4exams}R Documentation

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)

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.

Value

A decimal number rounded into exactly n decimal places.

See Also

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

Examples

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

fmtN(x,n)


[Package Tex4exams version 0.1.2 Index]