L2.norm: L2 norm of a given vector

Description Usage Arguments Value Author(s) See Also Examples

View source: R/StabilityFunctions.R

Description

A function for calculating the L2 norm of a given numeric vector.

Usage

1

Arguments

x

A numeric vector.

Value

The function returns the L2 norm of the given vector x.

Author(s)

Jasmina Bogojeska

See Also

L1.dist

Examples

1
2
3
4
5
## Define a numeric vector
y <- c(1, 2, 3, 4)

## Calculate the L2 norm of the vector y
L2.norm(y)

Example output

[1] 5.477226

Rtreemix documentation built on Nov. 8, 2020, 5:57 p.m.