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 Dec. 17, 2024, 6:16 p.m.