correct_rounded {YAPSA} | R Documentation

## Readjust the vector to it's original norm after rounding

### Description

After use of the function `round_precision` the norm of the input vector may have been altered by the rounding procedure. This function restores the norm by altering only the largest entry in the rounded vector (in order to create the least possible relative error).

### Usage

    correct_rounded(x, in_interval = c(0, 1))

### Arguments

`x` | vector to be rounded
`in_interval` | Interval

### Value

The adapted form of the input vector `x`.

### Examples

     NULL

[Package YAPSA version 1.18.0 Index]