Learn R Programming

InspectChangepoint (version 1.2)

vector.norm: Norm of a vector

Description

Calculate the entrywise L_q norm of a vector or a matrix

Usage

vector.norm(v, q = 2, na.rm = FALSE)

Arguments

v

a vector of real numbers

q

a nonnegative real number or Inf

na.rm

boolean, whether to remove NA before calculation

Value

the entrywise L_q norm of a vector or a matrix