rescale_unit: rescaling to unit interval

View source: R/dplyr_extensions.R

rescale_unitR Documentation

rescaling to unit interval

Description

scales a variable to the interval [0;1]

Usage

rescale_unit(
  x,
  lower = min(x, na.rm = T),
  upper = max(x, na.rm = T),
  scale = 1
)

rescale_zero_one(
  x,
  lower = min(x, na.rm = T),
  upper = max(x, na.rm = T),
  scale = 1
)

Arguments

x

numerical vector

lower

lowest possible value

upper

highest possible value

Value

numerical vector

Author(s)

Martin Schmettow


schmettow/bayr documentation built on March 23, 2024, 7:49 p.m.