round45: True Rounding

View source: R/my_function.R

my_functionR Documentation

True Rounding

Description

r round is not real round, it solve r round to even number problem.

Usage

round45(x, digit)

Arguments

x

a numeric parameter

digit

x round to digit decimal places

Examples

x <- 2.25
r_round <- round(x, digit=1)
my_round <- round45(x, digit=1)
print(paste("r_round: 2.25 round digit=1 is", r_round))
print(paste("my_round: 2.25 round digit=1 is", my_round))

hans0803/APLM documentation built on June 17, 2024, 5:22 a.m.