check.norm: Check function: norm

View source: R/checks.R

check.normR Documentation

Check function: norm

Description

This function checks whether the the norm used in the problem is a 1-norm or a 2-norm. If not, an error message is displayed.

Usage

check.norm(x, name.var)

Arguments

x

The variable to be checked.

name.var

The name of the variable.

Details

The following input for norm will be interpreted as the 1-norm:

  • 1 (numeric)

  • "1" (string)

  • "L1"

  • "one"

  • "o"

  • "taxicab"

The following input for norm will be interpreted as the 2-norm:

  • 2 (numeric)

  • "2" (string)

  • "L2"

  • "two"

  • "t"

  • "e"

  • "euclidean"

Capitalization is not an issue here as the text will be brought to the lower case.

Value

Nothing is returned.


conroylau/lpinfer documentation built on Oct. 25, 2024, 4 a.m.