Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

normalize

Normalize vector to sum to 1.


Description

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

Usage

normalize(x)

Arguments

x

Vector to be normalized

Value

Normalized vector

Author(s)

Albert Y. Kim

Examples

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

SpatialEpi

Methods and Data for Spatial Epidemiology

v1.2.3
GPL-2
Authors
Cici Chen [ctb], Albert Y. Kim [aut, cre], Michelle Ross [ctb], Jon Wakefield [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.