round_exactly {DTwrappers2}R Documentation

round_exactly

Description

This function rounds numeric values to a specified number of decimal places. The rounding is exact, meaning there will be exactly the specified number of decimal places even if this includes trailing zeros.

Usage

round_exactly(x, digits = 0, decimal = ".", ...)

Arguments

x

A numeric vector.

digits

The number of digits to round to. This number will be exact, meaning there will be exactly this number of decimal places listed even if this includes trailing zeros. For instance, setting digits = 5 for x = 2.54 would result in 2.54000.

decimal

The character specifying the decimal, which splits between whole numbers and the fractional component. Defaults to ".".

...

Additional arguments .

Value

A character vector of rounded numeric values with exactly the specified number of decimal places.


[Package DTwrappers2 version 0.0.3 Index]