softK {mogsa} | R Documentation

## Soft-thresholding operator

### Description

Soft-thresholding operator, which is called by `mbpca`.

### Usage

    softK(x, k)

### Arguments

`x` | A numerical vector
`k` | Number of non-zero elements want to keep

### Value

A numerical vector

### Author(s)

Chen Meng

### Examples

    v <- rnorm(10)
    softK(v, k = 2)

[Package mogsa version 1.18.1 Index]