Learn R Programming

accelerometry (version 3.1.2)

inverse_rle2: Inverse Run Length Encoding (Alternate Implementation)

Description

Re-constructs vector compressed by rle2.

Usage

inverse_rle2(x)

Arguments

x

Object returned by rle2.

Value

Integer or numeric vector.

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