Partition-class | R Documentation |
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.
Fabian Ball fabian.ball@kit.edu
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.