Skip to contents

Returns the normalised vector, where the sum of squares is equal to 1

Usage

norm_vec(x)

Arguments

x

numeric vector

Value

numeric vector

Examples

x <- rnorm(5)
norm_vec(x)
#> [1]  0.4931848  0.1005091 -0.1278353  0.7021041  0.4872111