rrleb: Recursive run length encoding bottom up.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rrle.R

Description

Encode a matrix as run-length, bottom up. Encoding respects previous runs, e.g line n-1 encodes rns in each run of line n.

May be removed.

Usage

1
rrleb(x)

Arguments

x

a matrix.

Value

list of run length encoded lines

Author(s)

Günther Sawitzki <gsawitzki@users.r-forge.r-project.org>

See Also

rle,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x <- matrix(c(
	3,3,4,4,4,
	 5,5,6,6,7,
	 8,9,9,0,0,
	 1,1,1,2,2

 ),nrow=4, ncol =5, byrow=TRUE)
 xrrleb <- rrleb(x)
 xrrleb

 t(sapply(xrrleb, inverse.rle))

sprof documentation built on May 2, 2019, 4:45 p.m.