mround: round a number to nearest given integer

Description Usage Arguments Value Examples

View source: R/short_functions.R

Description

round a number to nearest given integer

Usage

1
mround(x, base = 10)

Arguments

x

numeric value, can be a vector.

base

integer to round to. Default = 10

Value

x rounded to nearest base.

Examples

1
2
mround(11.32)
mround(seq(1,10,by=0.5),2)

ptompalski/UsefulRFunctions documentation built on May 26, 2019, 11:32 a.m.