roundm: Mathematical number rounding

View source: R/utils.R

roundmR Documentation

Mathematical number rounding

Description

This function rounds numbers in the mathematical sense, as opposed to the base R function round() that rounds 'to the even digit'.

Usage

roundm(x, decimals = 0)

Arguments

x

Vector of numerical values to round.

decimals

Integer indicating the number of decimal places to be used.

Value

A vector containing the entries of x, rounded to decimals decimals.

Examples

roundm(2.25, 1)

EQRN documentation built on April 4, 2025, 12:45 a.m.