round_precision: Round to a defined precision

Description Usage Arguments Value Examples

View source: R/basic_functions.R

Description

This function is an extension with regard to the function round from base R as it allows not only digits as precision, but can also round to a user-specified precision. The interval in which the rounding operation is to be carried out also can be specified by the user (default is the unit interval). Alternatively, breaks can be provided.

Usage

1
round_precision(x, breaks = NULL, in_precision = 0.05, in_interval = c(0, 1))

Arguments

x

Vector to be rounded

breaks

The breaks used for rounding. Default NULL

in_precision

Precition default 0.05

in_interval

Interval needs to be larger than the precision value

Value

A list with two entries:

Examples

1

slw287r/yapsa documentation built on June 7, 2020, 12:46 a.m.