Learn R Programming

Tex4exams (version 0.1.2)

fmt4: Convert a decimal number into exactly 4 decimal places.

Description

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

Usage

fmt4(x)

Value

A decimal number rounded into exactly 4 decimal places.

Arguments

x

a decimal number.

Details

Round a decimal number into exactly 4 decimal places without scientific notation.

See Also

fmtN

Examples

Run this code
x <- sin (sample(c(1:5),1))
fmt4(x)

Run the code above in your browser using DataLab