Plot heatmap.
Given a matrix or list of matrizes x
this function visualizes each matrix with a heatmap.
plotHeatmap(x, value.name = "Value", show.values = FALSE)
x
: [matrix
| list[matrix]
]
Either a matrix or a list of matrizes.
value.name
: [character(1)
]
Name for the values represented by the matrix. Internally, the matrix is transformed into a data.frame
via melt
in order to obtain a format which may be processed by ggplot
easily. Default is Value .
show.values
: [logical(1L)
]
Should the values be printed within the heatmap cells? Default is FALSE
.
[ggplot
] ggplot object.
# simulate two (correlation) matrizes x = matrix(runif(100), ncol = 10) y = matrix(runif(100), ncol = 10) ## Not run: pl = plotHeatmap(x) pl = plotHeatmap(list(x, y), value.name = "Correlation") pl = plotHeatmap(list(MatrixX = x, MatrixY = y), value.name = "Correlation") ## End(Not run)