round_manual: Round numbers to the specified number of decimal places

View source: R/cli.R

round_manualR Documentation

Round numbers to the specified number of decimal places

Description

This function rounds numbers to the specified number of decimal places using a manual method that avoids the typical rounding issues in R which may vary across different OS.

Usage

round_manual(x, digits = 0L)

Arguments

x

Numeric vector. The numbers to round.

digits

Integer. The number of digits to round to. Defaults 0.

Value

Numeric vector. The rounded numbers.


shapr documentation built on Aug. 25, 2025, 5:11 p.m.