---
title: "InteractiveComplexHeatmap in an R Markdown document"
author: "Zuguang Gu"
date: "01/01/2021"
output: html_document
runtime: shiny
---

This document demostrates an interactive heatmap.

```{r, echo = FALSE}
library(ComplexHeatmap)
library(InteractiveComplexHeatmap)
m = matrix(rnorm(100*100), 100)
ht = Heatmap(m)

ui = fluidPage(
    InteractiveComplexHeatmapOutput()
)

server = function(input, output, session) {
    makeInteractiveComplexHeatmap(input, output, session, ht)
}

shiny::shinyApp(ui, server, options = list(height = 700))
```


The source code of this R Markdown document is:

````markdown
---
title: "InteractiveComplexHeatmap in an Rmarkdown document"
author: "Zuguang Gu"
date: "16/12/2020"
output: html_document
runtime: shiny
---

This document demostrates an interactive heatmap.

`r ''````{r, echo=FALSE}
library(ComplexHeatmap)
library(InteractiveComplexHeatmap)
m = matrix(rnorm(100*100), 100)
ht = Heatmap(m)

ui = fluidPage(
    InteractiveComplexHeatmapOutput()
)


server = function(input, output, session) {
    makeInteractiveComplexHeatmap(ht, input, output, session)
}

shiny::shinyApp(ui, server, options = list(height = 700))
```
````
