This function produces simple, heatmaplike visualizations of binary matrices.
1 
x 
Binary matrix to visualize 
boxCol 
Color to use for boxes of '1's 
reorder 
logical; states whether the rows shall be reordered according to the size of the category 
frame 
logical; states whether a frame should be drawn around
the visualization. In contrast to the frame drawn in

... 
further arguments passed on to 
For reordering, each row is interpreted as a binary matrix, for example a row z=(1,0,0,1) would be interpreted as the binary number 1001 = 9 in the decimal system. Rows are then reordered by the frequency of each binary number with the rows that correspond to the most frequent binary number shown at the top in the visualization.
The function invisibly returns the (reordered)
matrix x
, but its mainly called for its side effect of
producing the visualization.
An alternative way to display such matrices are given by
heatmap
or, the simpler version thereof, image
.
However, image files produced with this functions tend to be very
large. This function uses plot.default
and polygon
which
results in much smaller file sizes and is sufficient for binary
matrices.
Joern Toedling
1 2 3 4 5 6 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.