normalize: Normalize vector to sum to 1.

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Divide each element in the vector by the sum of the vector elements.

Usage

1

Arguments

x

Vector to be normalized

Value

Normalized vector

Author(s)

Albert Y. Kim

Examples

1
2
3
x <- rep(1, 10)
x <- normalize(x)
x

SpatialEpi documentation built on June 2, 2018, 9:04 a.m.