shrink.towards {hedgehog}R Documentation

Shrink an integral number by edging towards a destination.

Description

Note we always try the destination first, as that is the optimal shrink.

Usage

shrink.towards(destination)

Arguments

destination

the value we want to shrink towards.

Examples

shrink.towards (0) (100)
# [0,50,75,88,94,97,99]

shrink.towards(500)(1000)
# [500,750,875,938,969,985,993,997,999]

shrink.towards (-50) (-26)
# [-50,-38,-32,-29,-27]

[Package hedgehog version 0.1 Index]