A companion pairs.table method is also provided that uses this
improved function as the default diagonal panel.
The function follows the "grapcon_generator" pattern used throughout
vcd: calling pairs_diagonal_mosaic(...) returns a
function suitable for passing as the diag_panel argument of
pairs.table.
The original vcd::pairs_diagonal_mosaic has two bugs: (1) the
labeling argument is accepted but then hardcoded to
labeling_values inside the returned function, and (2)
alternate_labels is similarly hardcoded to TRUE. This version
fixes both, making those arguments work as documented.
The default labeling scheme was changed from labeling_values to
labeling_border, so as to disable cell counts by default. To
enable cell counts, use labeling_values.
pairs.table is an S3 method for pairs that
overrides the version in vcd solely to change the default
diag_panel to the improved pairs_diagonal_mosaic defined in
this package. All actual rendering is delegated to the vcd implementation,
retrieved via utils::getFromNamespace() to avoid a ::: check NOTE.