For logical input labels all instances of "TRUE" with a unique label and everything else as false

For non-logical (e.g. character) input labels, labels each contiguous runs of the same value with a unique label (note: even subsequent runs of an earlier used value in the vector will be given a new unique label)

label.runs(x)

Author

Marcin Imielinski