sparsify: Sparsify a vector

View source: R/sparsify.R

sparsifyR Documentation

Sparsify a vector

Description

Keep top x% of values of a vector

Usage

sparsify(x, sparseness)

Arguments

x

Input vector

sparseness

Percent of values of x to keep. The rest will be set to zero.

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.