Learn R Programming

nvctr (version 0.1.7)

unit: Make input vector unit length, i.e. norm == 1

Description

Make input vector unit length, i.e. norm == 1

Usage

unit(vector)

Value

a unit length vector

Arguments

vector

a vector

See Also

Other helpers: deg(), rad()

Examples

Run this code
unit(c(1,2,3))

Run the code above in your browser using DataLab