R: Normalize a Numeric Vector

normalize {swfscMisc} | R Documentation

## Normalize a Numeric Vector

### Description

Normalize a numeric vector to have a mean of zero and a standard deviation of one.\

### Usage

    normalize(x)

### Arguments

`x` | a numeric vector.

### Value

a numeric vector of the same length as `x`.

### Author(s)

Eric Archer eric.archer@noaa.gov

### Examples

    x <- runif(20, 50, 110)
    x.norm <- normalize(x)
    mean(x)
    mean(x.norm)
    sd(x)
    sd(x.norm)

[Package swfscMisc version 1.2 Index]