round2 {MetaUtility}R Documentation

Round while keeping trailing zeroes

Description

Rounds a numeric value and formats it as a string, keeping trailing zeroes.

Usage

round2(x, digits = 2)

Arguments

x

Numeric value to round

digits

Digits for rounding

Examples

round2(0.03000, digits = 4)

# compare to base round, which drops trailing zeroes and returns a numeric
round(0.03000, digits = 4)

[Package MetaUtility version 2.1.2 Index]