View source: R/aided_chatgpt.R
normalize.vector | R Documentation |
This function normalizes a numeric vector so that all values are scaled to the range [0, 1].
normalize.vector(x)
x |
A numeric vector to be normalized. |
A numeric vector with values scaled to the range [0, 1]. If all values are identical, all values are set to 0.
# Example with a numeric vector
normalize.vector(c(1, 2, 3, 4, 5))
# Example with a vector containing identical values
normalize.vector(c(3, 3, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.