projl1: Compute the projection of a vector onto the l1 ball.

Description Usage Arguments Value Examples

View source: R/projl1.R

Description

Compute the projection of a vector onto the l1 ball.

Usage

1
projl1(v, a)

Arguments

v

A vector of numerics

a

The radius (>0) of the l1 ball

Value

The projection of v onto the l1 ball of radius a.

Examples

1
projl1(1:10, 21)

vguillemot/sparseMCA documentation built on Nov. 5, 2019, 12:02 p.m.