round_any: Round any

Description Usage Arguments Value Examples

View source: R/utils.R

Description

rounds a numeric value to any arbitrary degree of precision. defaults to nearest whole integer

Usage

1
round_any(x, accuracy = 1)

Arguments

x

a numeric vector

accuracy

a numeric value specifying the base for rounding

Value

a vector of the same length as x rounded to the defined accuracy

Examples

1
round_any(c(1, 1.25, 1.5, 1.75, 2), accuracy = 0.5)

CC-HIC/inspectEHR documentation built on Jan. 16, 2020, 11:24 p.m.