norm1: Normalise to sum to 1.

Description Usage Arguments Value Author(s)

View source: R/abf.R

Description

Normalises a vector so that the elements sum to 1, in a relatively numerically stable way.

Usage

1
norm1(x, log = FALSE)

Arguments

x

Values to be normalised.

log

Whether values of x are logged and should be exponentiated when normalising.

Value

A vector of normalised values that sums to 1.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com


tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.