fac2seg: Factor to Segments

View source: R/fac2seg.R

fac2segR Documentation

Factor to Segments

Description

Factor to Segments

Usage

fac2seg(fac)

Arguments

fac

A factor where each level represents a segment

Value

A list of vectors, each vector contains the indices of the elements of the corresponding segment

See Also

CV segments by various patterns: cvsegments.

Examples

fac <- factor(c("a", "b", "a", "b", "c", "c"))
fac2seg(fac)

pls documentation built on Feb. 21, 2026, 9:07 a.m.