Last chance! 50% off unlimited learning
Sale ends in
Given a matrix or list of matrizes x
this function
visualizes each matrix with a heatmap.
plotHeatmap(x, value.name = "Value", show.values = FALSE)
[ggplot
] ggplot object.
[matrix
| list[matrix]
]
Either a matrix or a list of matrizes.
[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”.
[logical(1L)
]
Should the values be printed within the heatmap cells?
Default is FALSE
.
# simulate two (correlation) matrizes
x = matrix(runif(100), ncol = 10)
y = matrix(runif(100), ncol = 10)
if (FALSE) {
pl = plotHeatmap(x)
pl = plotHeatmap(list(x, y), value.name = "Correlation")
pl = plotHeatmap(list(MatrixX = x, MatrixY = y), value.name = "Correlation")
}
Run the code above in your browser using DataLab