scaleTo: Scale numeric vector

View source: R/general.purpuse.utilities.R

scaleToR Documentation

Scale numeric vector

Description

Scale numeric vector

Usage

scaleTo(
  x,
  from = 0,
  to = 1,
  minx = min(x, na.rm = TRUE),
  maxx = max(x, na.rm = TRUE),
  fraction = 1
)

Arguments

x

numeric vector to be scaled

from, to

target range

minx, maxx

true min of "real x" (in case if given x is just subset of the real)

fraction

fraction of target range to be used

Value

scaled value


iaaka/visutils documentation built on Jan. 17, 2025, 11:29 p.m.