Partition-class: Simple S4 class to represent a partition of objects as vector...

Partition-classR Documentation

Simple S4 class to represent a partition of objects as vector of class labels.

Description

This class is a wrapper around a vector but allows only the atomic vectors logical, numeric, integer, complex, character, raw. The reason for this is that only those types seem to make sense as class labels. Furthermore, class labels are immutable.

Author(s)

Fabian Ball fabian.ball@kit.edu

Examples

p <- new("Partition", c(0, 0, 1, 1, 1))
q <- new("Partition", c("a", "a", "b", "b", "b"))

## Not run: 
# This won't work:
new("Partition", c(list("a"), "a", "b", "b", "b"))
p[2] <- 2

## End(Not run)


partitionComparison documentation built on Aug. 24, 2023, 1:06 a.m.