Learn R Programming

htmlTable (version 2.4.3)

prepGroupCounts: Retrieves counts for rgroup, cgroup, & tspanner arguments

Description

This function is a wrapper to base::rle() that does exactly this but is a little too picky about input values.

Usage

prepGroupCounts(x)

Value

list(n = rle$lengths, names = rle$values)

Arguments

x

The vector to process

Examples

Run this code
prepGroupCounts(c(1:3, 3:1))

Run the code above in your browser using DataLab