R/utilities.R
scale_safely.Rd
Discussed in PR #32: https://github.com/briatte/ggnetwork/pull/32
scale_safely(x, scale = diff(range(x)))
a vector to rescale
the scale on which to rescale the vector
The rescaled vector, coerced to a vector if necessary. If the original vector was constant, all of its values are replaced by 0.5.
Kipp Johnson