https://github.com/exaexa/shinydendro
idendro for R Shiny (pronounce as shin-i-dendro)
https://github.com/exaexa/shinydendro
Last synced: 11 months ago
JSON representation
idendro for R Shiny (pronounce as shin-i-dendro)
- Host: GitHub
- URL: https://github.com/exaexa/shinydendro
- Owner: exaexa
- Created: 2019-08-15T12:34:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T16:43:06.000Z (over 6 years ago)
- Last Synced: 2025-01-06T02:40:40.122Z (over 1 year ago)
- Language: JavaScript
- Size: 177 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shinyDendro
This provides idendro-style interactive dendrograms in R Shiny (see https://github.com/tsieger/idendro).
## What does it look like?
You can see an example Shiny dashboard in file `test.R`. You should get
something like this:

A video with a common use case should be available here:
https://www.youtube.com/watch?v=MJgbCG8grTU
## Controls
- keys `a` to `z` and `0` to `9` select a cluster mark
- mouse click assigns the mark to the clicked branch
- `space` sets mark-erasing mode
## Shiny interface
```r
dendrogram <- hclust(...)
ui <- fluidPage(
titlePanel("shinyDendro test"),
shinyDendroOutput('SD', width='50em', height='50em')
)
server <- function(input, output) {
output$SD <- renderShinyDendro({
shinyDendro(
'selectedClusters',
dendrogram$height,
dendrogram$merge,
dendrogram$order
)
})
# input$selectedClusters now contains a reactive result with assigned marks.
#
# Example:
# input$selectedClusters == c(' ', ' ', 'a', 'b', 'a', ...)
# ...
}
```