digits: Numeric vector showing pre-specific digits

Description Usage Arguments Examples

View source: R/formats.R

Description

Numeric vector showing pre-specific digits

Usage

1
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

1
2
digits(pi, 2)
digits(123.45678, 3)

Example output

[1] 3.14
[1] 123.457

formattable documentation built on Jan. 13, 2021, 7:17 a.m.