Learn R Programming

formattable (version 0.1.5)

digits: Numeric vector showing pre-specific digits

Description

Numeric vector showing pre-specific digits

Usage

digits(x, digits, format = "f", ...)

Arguments

x
a numeric vector
digits
an integer to indicate the number of digits to show.
format
format type passed to formatC.
...
additional parameters passed to formattable.

Examples

Run this code
digits(pi, 2)
digits(123.45678, 3)

Run the code above in your browser using DataLab