mround: Round function for printing

View source: R/mround.R

mroundR Documentation

Round function for printing

Description

This function can be used for tables, e.g. when trailing zeros are wanted.

Usage

mround(x, digits = 1)

Arguments

x

Numeric object.

digits

Number of digits after comma, default = 1.

Value

Rounded character object with trailing zeros.

Examples


mround(10.123, digits = 1)
# "10.1"
mround(10.000, digits = 1)
# "10.0"


bsurial/bernr documentation built on Nov. 7, 2022, 1:41 a.m.