Learn R Programming

partitions (version 1.10-9)

condense: Condensed form for partitions

Description

Given a partition, coerce to a nice compact character format

Usage

condense(x, minval=1, col)

Arguments

x

A partition or a matrix whose columns are partitions

minval

Minimum value to include in the printing, defaulting to 1 [meaning to ignore zero values]. Set to “0” for compositions

col

String specifying the collapse value with missing value meaning to use the empty string if values are all single digit, and a comma if not. Using “+” is good for actual partitions

Author

Robin K. S. Hankin

Details

Experimental: caveat emptor!

Examples

Run this code

condense(parts(9))
condense(compositions(9,3),0)
condense(diffparts(17),col="+")

Run the code above in your browser using DataLab