Learn R Programming

Perc (version 0.1.6)

plotConfmat: generate heat map for a matrix

Description

plotConfmat generate heat map for a matrix or a win-loss probability matrix

Usage

plotConfmat(conf.mat, ordering = NA, labels = FALSE, ...)

Arguments

conf.mat

an N-by-N matrix. Either a conflict matrix or a win-loss probability matrix (the second element from conductance output)

ordering

a reordering of the rows/columns, specified by a permutation of 1:N

labels

if TRUE, displaying the agent names as specified in the rownames() of conf.mat() on the heatmap

...

Further argument may be supplied and processed by lattice::levelplot.

Value

A heatmap

See Also

as.conflictmat, conductance

Examples

Run this code
# NOT RUN {
# convert an edgelist to conflict matrix
confmatrix <- as.conflictmat(sampleEdgelist)
# find win-loss probability matrix
perm2 <- conductance(confmatrix, 2)
# plotting
plotConfmat(perm2$p.hat)
# }

Run the code above in your browser using DataLab