round.resolution: Round off to given resolution

Description Usage Arguments Value Author(s)

View source: R/clanToolsFunctions.R

Description

Round off to given resolution. Resolution = mininum difference between two values in the output that we want to her about.

Usage

1

Arguments

x

is a vector of numeric values

resolution

is the resolution. For example, 0.2 means that the output can be 0, 0.2, 0.4, 0.6 etc. Resolution equal to 0.001 means that be can have 1.001, 1.002 etc.

offset

is controlling the output as follows: If offset=0 then all input from 0 to 1.999... will give 2 as output etc. If offset=0.5 then all input from -1 to 0.999... will give 2 as output etc. If offset=1.0 then all input from 0 to 1.999... will give 2 as output etc.

Value

A vector with the rounded numbers.

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on Oct. 23, 2020, 7:59 a.m.