round: Round

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This is a custom round function that rounds a number to the nearest whole number down if the decimal is below 0.5 and up if it is above. Default R round behavior rounds decimals of 0.5 down when the whole number is even and this function avoids that behavior.

Usage

1
round(x, n)

Arguments

x

the number or vector of numbers to round (numeric)

n

the number of decimal places to round (integer)

Value

returns a rounded version of the value provided

Examples

1
round(4.5, 0)

melren/effiplot documentation built on May 4, 2019, 7:37 a.m.