normalize: Normalize

View source: R/utils.R

normalizeR Documentation

Normalize

Description

Normalizes the values in x so that they sum to 1. Proportion indicates whether to set values to 0.

Usage

normalize(x, proportion = 1)

Arguments

x

A numeric vector

proportion

A number between 0 and 1

Value

A numeric vector of the normalized values.

Examples

normalize(c(0.1, 100, 10), proportion = 0.95)

poissonconsulting/dts documentation built on March 10, 2024, 6:21 a.m.