Learn R Programming

nvctr (version 0.1.4)

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

Description

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

Usage

unit(vector)

Arguments

vector

a vector

Value

a unit length vector

See Also

Other helpers: deg(), rad()

Examples

Run this code
# NOT RUN {
unit(c(1,2,3))

# }

Run the code above in your browser using DataLab