Learn R Programming

accelerometry (version 2.2.5)

inverse.rle2: Inverse Run Length Encoding (Alternate Implementation)

Description

Re-construct vector compressed by rle2.

Usage

inverse.rle2(x)

Arguments

x

Object returned by rle2.

Value

Numeric or character vector.

References

Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.

See Also

rle2, rle, inverse.rle

Examples

Run this code
# NOT RUN {
# Create dummie vector x
x <- c(0, 0, 0, -1, -1, 10, 10, 4, 6, 6)

# Summarize x using rle2
x.summarized <- rle2(x)

# Reconstruct x
x.reconstructed <- inverse.rle2(x.summarized)
# }

Run the code above in your browser using DataLab