round.probabilities {som.nn} | R Documentation |
Advanced rounding of vectors
Description
Rounds a vector of probabilities preserving their sum.
Usage
## S3 method for class 'probabilities'
round(x, digits = 2)
Arguments
x |
|
digits |
demanded precision |
Details
In general, if a vector of floating point values is rounded,
the sum is not preserverd.
For a vector of probabilities (which sum up to 1.0), this may lead to
strange results.
This function rounds all values of the vector and takes care, that
the sum ist not changed (with a precision given in digits
).
[Package som.nn version 1.4.4 Index]