Learn R Programming

pls (version 2.9-0)

fac2seg: Factor to Segments

Description

Factor to Segments

Usage

fac2seg(fac)

Value

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

Arguments

fac

A factor where each level represents a segment

See Also

CV segments by various patterns: cvsegments.

Examples

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

Run the code above in your browser using DataLab