Learn R Programming

wavethresh (version 4.6.1)

uncompress.default: Undo zero run-length encoding for a vector.

Description

This function inverts the action carried out by the compress.default function.

Usage

## S3 method for class 'default':
uncompress(v, verbose=FALSE, ...)

Arguments

v
The object to uncompress
verbose
Print an informative message whilst executing
...
Other arguments

Value

  • The uncompressed, reinstated, vector.

Details

The inverse of compress.default

See Also

compress.default, uncompress

Examples

Run this code
uncompress(compress(c(1, rep(0,99), 1)))
#[1] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#[38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#[75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Run the code above in your browser using DataLab