normalize | R Documentation |
Given a vector of probabilities, normalize ensures they sum up to 1.
normalize(x, ...) ## Default S3 method: normalize(x)
x |
A numeric vector of probabilities, or an object from a class for which a method has been defined. |
This is a generic function. Methods can be written for classes
holding probability distributions. The default method takes a vector x
and
returns x / sum(x)
. Specific methods should normalize
the element holding
the probabilities within the object, and return the modified version of that
object.
A numeric vector, or an object from a class for which a method has been created.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.