print.partition {partitions} | R Documentation |
Print methods for partition objects and equivalence objects
Description
A print method for partition objects, summary partition objects, and equivalence classes. Includes various configurable options
Usage
## S3 method for class 'partition'
print(x, mat = getOption("matrixlike"), h = getOption("horiz"), ...)
## S3 method for class 'summary.partition'
print(x, ...)
## S3 method for class 'equivalence'
print(x, sep = getOption("separator"), ...)
Arguments
x |
Object to be printed: an object of class either
|
mat |
Boolean, with |
h |
Boolean governing the orientation of the printed matrix, with
|
sep |
Character vector, with special value of |
... |
Further arguments provided for compatibility |
Details
The print method is sensitive to the value of option matrixlike
which by default sets column names to a space for more compact
printing. Set to TRUE
to print a partition like a matrix.
Option horiz
specifies whether or not to print a partition
horizontally.
Note
The print method for objects of class equivalence
gives things
like
listParts(3:1) [[1]] [1] {1,2,6}{4,5}{3} [[2]] [1] {1,2,6}{3,4}{5} ... [[59]] [1] {4,5,6}{1,2}{3} [[60]] [1] {4,5,6}{2,3}{1}
The curly brackets are to remind you that function listParts()
gives set partitions, not cycle representation of a permutation
as per the permutations package.
Author(s)
Robin K. S. Hankin
Examples
print(parts(5))
summary(parts(7))
listParts(3)
options(separator="")
listParts(5)