plotConfmat: generate heat map for a matrix

Description Usage Arguments Value See Also Examples

View source: R/plot.conf.mat.R

Description

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

Usage

1
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

1
2
3
4
5
6
# convert an edgelist to conflict matrix
confmatrix <- as.conflictmat(sampleEdgelist)
# find win-loss probability matrix
perm2 <- conductance(confmatrix, 2)
# plotting
plotConfmat(perm2$p.hat)

Perc documentation built on May 12, 2021, 1:08 a.m.