force_decimals: Force printing a specified number of decimals for a number

Description Usage Arguments Value Author(s) Examples

View source: R/force_decimals.R

Description

Force printing a specified number of decimals for a number

Usage

1
force_decimals(x, decimals = 2)

Arguments

x

the numeric values to be printed

decimals

how many decimals are to be printed. Defaults to 2.

Value

The number in the required format

Author(s)

Martin Papenberg martin.papenberg@hhu.de

Examples

1
2
force_decimals(c(1.23456, 0.873, 2.3456))
force_decimals(c(1.23456, 0.873, 2.3456), 3)

Alaburda/statistician documentation built on Jan. 8, 2021, 4:31 a.m.