Round x
up to ceiling(x)
if x-floor(x) >= threshold
,
otherwise round down to floor(x)
.
ceil_at(x, threshold)
numeric vector or matrix >= 0 (NaN
is not supported)
threshold in [0,1] or "harmonic"/"geometric" to use harmonic or geometric mean thresholds
the rounded vector or matrix