norm: N-Norm of a vector

Description Usage Arguments Value Examples

View source: R/vector_norm.R

Description

Calculates the n-norm of a vector

Usage

1
norm(v, n = 2)

Arguments

v

must be a numerical vector

n

must be an integer. Defaults to 2.

Value

The vector's norm

Examples

1
2
v = rnorm(n = 200)
norm(v)

pedrocava/mathr documentation built on May 29, 2020, 8:32 p.m.