decimals_only: Printing a specified number of decimals and ignore leading...

Description Usage Arguments Value Author(s) Examples

View source: R/decimals_only.R

Description

Printing a specified number of decimals and ignore leading zeros

Usage

1
decimals_only(x, decimals = 2, decimals1 = FALSE)

Arguments

x

the values to be printed

decimals

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

decimals1

Boolean - should a value of exactly 1 be converted to 1.00. Defaults to FALSE.

Value

The number in the required format

Author(s)

Martin Papenberg martin.papenberg@hhu.de

Examples

1
decimals_only(c(0.23456, 0.873, 0.3456), decimals = 3)

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