values.to.range: Scale values into a given range.

View source: R/connectome.R

values.to.rangeR Documentation

Scale values into a given range.

Description

Linearly maps the values to the target range. Values which are all identical (or a single value) are mapped to the middle of the range.

Usage

values.to.range(x, target_range)

Arguments

x

numeric vector, the input values.

target_range

numeric vector of length 2, the target range.

Value

numeric vector of the same length as x, the scaled values.


fsbrain documentation built on Sept. 27, 2026, 1:07 a.m.