Learn R Programming

MCOE (version 0.6.0)

round2: Rounding the way most people do it with .5 roudning up

Description

Rounding the way most people do it with .5 roudning up

Usage

round2(x, digits = 2)

Value

`round2` returns a truncated `numeric` with decimal places equal to `digits` argument

Arguments

x

number to be rounded

digits

how many digits to round to

Examples

Run this code
x <- 1.2345
round2(x, digits = 2)

Run the code above in your browser using DataLab