View source: R/graphtest-functions.R
scale_safely | R Documentation |
Copied from https://github.com/briatte/ggnetwork/blob/f3b8b84d28a65620a94f7aecd769c0ea939466e3/R/utilities.R so as to fix a problem with the cran version of ggnetwork.
scale_safely(x, scale = diff(range(x)))
x |
a vector to rescale |
scale |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.