View source: R/clanToolsFunctions.R
round.resolution | R Documentation |
Round off to given resolution. Resolution = mininum difference between two values in the output that we want to her about.
round.resolution(rnorm(100),0.05)
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. |
A vector with the rounded numbers.
Claus E. Andersen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.