Learn R Programming

plsdof (version 0.3-2)

normalize: Normalization of vectors

Description

Normalization of vectors.

Usage

normalize(v, w = NULL)

Value

v

normalized v

w

normalized w

Arguments

v

vector

w

optional vector

Author

Nicole Kraemer, Mikio L. Braun

Details

The vector v is normalized to length 1. If w is given, it is normalized by the length of v.

Examples

Run this code

v<-rnorm(5)
w<-rnorm(10)
dummy<-normalize(v,w)

Run the code above in your browser using DataLab