normalize | R Documentation |
Divide a vector by its sum, resulting in a vector with sum equal to one.
normalize(x)
x |
vector of input data. |
the input divided by its sum. For the row-wise version, each row is divided by its sum.
This function will return NA
when any elements of the input
are NA
. May return Inf
if the elements sum
to zero.
Steven E. Pav shabbychef@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.