hmap: Draw a Heat Map for Objects Based on ``itemMatrix''
Description
Provides the generic function hmap and the S4 method
to draw a heat map (an image with dendrogram added and
reordered rows and columns) for objects based on
itemMatrix (e.g., transactions).
Usage
hmap(x, ...)
## S3 method for class 'itemMatrix':
hmap(x, distfun = function(z) dist(z, method = "binary"),
margins = c(10, 10),
xlab = "Items (Columns)", ylab = "Elements (Rows)",
col = gray(seq(from = 1, to = 0, length = 100)), ...)
Arguments
x
an object of class "itemMatrix".
distfun
distance function; default is Jaccard (binary).
margins
a numeric vector of length 2 containing the margins.
hmap is an interface to heatmap for binary transactions.
In addition
to make Jaccard the standard distance measure, also columns
for items which do not occur in x are discarded before
calculating distances. This can make computing the heat map significantly
faster for random samples from a set of transactions.